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


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

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