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


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

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