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


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

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