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


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

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