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


word = "Python"
print(word[::-1])

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