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


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

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