Level 10 : What will be the output of the following code?


word = "Hello"
print(word[-1])

Author: bhavani | Tags: string | 1859+ Python FAQs | Share
anchors-(^,-$) | quantifiers-(*,-+,-?,-{}) | asyncio | introduction-to-multiprocessing | format | function-and-scope | control-statement | generators | function-argument | else | array | generator | data-types | enumerate() | binary | formal-and-actual-parameter | head-and-tail | int | assert | class-and-object | application | compute | dictionary-methods | class-and-instance-variable | control-flow | dictionary | floating-point-precision | inheritance | debugging | basic | input-function | key-value-pairs | default-mutable-argument | class | exception-handling | control-flow | counter-function | goto-function | data-structure | escape-operator | error-handling | arithmetic-expression | dictionary-comprehensions | list-join | advanced-file-operations | id-function | handling-missing-values-(fillna,-dropna) | file_handling | list-operation | boolean-and-non-boolean | formatting-with-strftime | max-min | mathematics | parsing-with-strptime | opening-files-(open()) | list-slicing | comprehension | class-and-inheritance | multiprocessing | methods | python-history | mapping-function | indexing:-loc-vs-iloc | loop-control-statements | random-function | memory-management | staticmethod | logical-operator | append | built-in-function | fabs-function | list,-set,-and-dictionary-comprehensions | comment | thread | lists | list-comprehension | creating-and-starting-threads | sys-module | copy | conditional-statement | name-mangling | choice | string-methods | overflow | heap-memory | strings | precedence | recurssion | error-handling | numeric | statement | dicts | deep-copy | rollback | feature | installation | module | init | pandas | reading:-read(),-readline(),-readlines() | collection | conversion | bitwise-operator | nested-loop | single-inheritance | immutability | software-design | lambda-function | bitwise | logical-operation | data-type-conversions | higher-order-function | multiple-except-blocks | string-method | string-slicing | global-variable | tuples | random | python-syntax-and-structure | data-structures-in-python | attribute | exponentiation | list-method | regex | loop-control | walking-through-directories-using-os.walk() | data-type | using-os-and-pathlib-modules | operator-or | sets | list-vs-tuple | type-conversion | classes | data_structure | turtle | pickling--unpickling | min-function | complex-number | type-conversion-and-casting | counter | docstring | file | defining-functions | booleans | file-handling | memory | datatype | literal-characters-and-special-characters | exception-handling | python-module | round | unit-testing | sum() | intering | call | input-function | data-type | multithreading | logical-operator | sum-function | update | raise-statement | objects | introduction-to-python | namespace | matrix-list-comprehension | math-copysign | threading | reading-and-writing-large-files-efficiently | global-keyword | context-manager | decimal | while-loop | while-else-loop | membership-operators-(in,-not-in) | keyword | static-method | string-slicing | stack | indexing | expression | frozenset | min-max-function | working-with-binary-files-(rb,-wb) | bitwise-operator | match | postfix | managing-directories-with-os-and-shutil | error | syntax | lambda-functions | scientific-notation | iterator | touples | with-statement | writing:-write(),-writelines() | string | python-repl | why-use-multiprocessing-over-threading?-(gil) | zip | lambdas | joining-and-merging-dataframes | string-concatenation | invalid-list | collections | arithmetic-operation | arbitrary-arguments-(*args,-**kwargs) | access-modifier | encapsulation | mutable | filter-function | raise | integer | benefit | map-function | using-assertions-(assertequal,-assertraises) | gil | else-statement | set-operation | working-with-dates-and-times | working-with-temporary-files-using-tempfile | operator-overloading | filter | conditional-statements | introduction-to-threads | def | default-arguments | tuple | loops | input | operand | command-line-parsing | identity-operator | indentation | magic-method | pass | list-methods-and-slicing | functional-programming | return-statement | method-overloading | regular-expression | __all__-attribute | built-in | syntaxerror | oop | range | lambda | operations | class-decorators | inherit | print-statement | tuple-methods | dataframe-and-series-objects | directory-operations | using-map()-for-transformations | string-iteration | slice | object-attribute | zip-function | string-formatting | center | list-indexing | interpreter | shallow-copy | file-handling | working-with-file-paths | built-in-function | logical-operators | mathematical-function | namedtuple | using-the-threading-module | odd-number | encoding | descriptors | python_version | dictionaries | sorting | list-mutation | for | using-join()-and-is_alive()-methods | string-manipulation | thread-synchronization | list-comprehension | sys | using-yield-in-functions | __future__ | package-management | list | built-in-modules | boolean | while-and-for-loop | version-check | asyncio-module | polymorphism | global-variable | creating-custom-modules | mysql | iterators | operators | identifier | implementation | pep | list-comprehensions | reading-and-writing-files | functional-programming | string-method | test-discovery | virtual-environment | binary-operation | multiple-inheritance | math | iterable | global | overriding-methods | assignment-operators | function | syntax-error | generators-in-python | loop | type-conversion | __init_subclass__ | set | matplotlib | typeerror | assignment-operator | oops | async | recursion | multiple-inheritance | type_conversion | method | numpy | parameter | precedence-and-associativity | operator-and | using-else-and-finally | while-loops | python | integers | comparison | operator | destructor | print | floats | syntax-error | datetime.date,-datetime.time,-datetime.datetime | filtering-and-indexing | import-method | aggregating-data-with-functools.reduce() | data-structures | library | string-formatting | python-operators | split | round-function | condition | exception | functions | immutable-data-type | join | factorial-function | sorted | python-django | pseudocode | identity-operator | version | tuple-unpacking | slicing | yield | expand-tab | swapping | using-lists-as-stacks | sorting-and-ranking | constructor | datetime | matrix | identity-operators-(is,-is-not) | thread-safe-data-structures-(queue.queue) | complex | data-structure | time-series-with-pandas | virtual-environment | conditional-statement | design-principle | difference-between-threads-and-processes | variable | regular-expressions | boolean-masking | zfill-function | decorator ...