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


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

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