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


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

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