Level 1 : What is output for the following code


string = "python"
string2 = string[2:] + string[:2]
print(string in 2*string2)

Author: VenuEmmela | Tags: slice | 1736+ Python FAQs | Share
generators | iterator | python-module | numpy | list-indexing | gil | choice | complex-number | min-max-function | decorator | string-slicing | boolean | array | regex | methods | data-type | conditional-statement | mapping-function | fabs-function | __init_subclass__ | round-function | bitwise-operator | generators-in-python | syntaxerror | function-argument | postfix | collections | built-in | operator-or | list-join | round | library | logical-operator | python | polymorphism | numeric | global-variable | mathematical-function | loop | built-in-function | class | string-slicing | def | matrix-list-comprehension | error-handling | while-loop | matplotlib | oop | string-method | syntax-error | command-line-parsing | immutable-data-type | condition | input-function | __future__ | identity-operator | zip | typeerror | global-keyword | control-statement | access-modifier | encoding | application | multiple-inheritance | loops | pseudocode | counter-function | virtual-environment | max-min | version | escape-operator | formal-and-actual-parameter | with-statement | boolean-and-non-boolean | function-and-scope | list-comprehension | data-type | inheritance | file-handling | virtual-environment | input | python-repl | exponentiation | dictionaries | raise | list-method | parameter | operator-overloading | complex | string-concatenation | call | slicing | else-statement | precedence-and-associativity | odd-number | context-manager | frozenset | file_handling | object-attribute | string-manipulation | assignment-operator | compute | split | return-statement | control-flow | memory-management | pandas | python-history | indexing | logical-operator | classes | turtle | zip-function | print | function | descriptors | swapping | thread | operations | floating-point-precision | set | assert | filter | deep-copy | rollback | module | immutability | goto-function | sys-module | mysql | operator | benefit | pickling-&-unpickling | built-in-function | min-function | set-operation | sum() | lists | collection | map-function | async | installation | destructor | functions | package-management | identity-operator | dictionary | string-formatting | __all__-attribute | exception-handling | binary-operation | lambda-function | data-structure | operand | yield | import-method | stack | data-structure | string | init | namedtuple | zfill-function | lambdas | sorting | docstring | math-copysign | higher-order-function | id-function | recurssion | design-principle | list-comprehension | generator | input-function | conditional-statement | while-else-loop | while-and-for-loop | exception | list-slicing | match | comparison | staticmethod | error | shallow-copy | loop-control | slice | filter-function | python_version | attribute | scientific-notation | invalid-list | feature | bitwise | default-mutable-argument | arithmetic-operation | operators | mathematics | asyncio | basic | update | precedence | datatype | expand-tab | statement | enumerate() | encapsulation | implementation | factorial-function | type_conversion | expression | head-and-tail | regular-expression | sys | list-operation | list-vs-tuple | overflow | string-iteration | debugging | multithreading | namespace | class-and-object | inherit | datetime | python-django | version-check | objects | sorted | dicts | decimal | list | tuple-unpacking | nested-loop | iterable | variable | syntax | asyncio-module | interpreter | string-formatting | class-and-inheritance | recursion | integer | software-design | int | math | exception-handling | random-function | keyword | functional-programming | join | matrix | memory | type-conversion | magic-method | counter | multiprocessing | control-flow | bitwise-operator | lambda | oops | touples | append | indentation | global | arithmetic-expression | tuple | class-and-instance-variable | sum-function | syntax-error | data_structure | method | binary | file | string-method | threading | format | random | type-conversion | identifier | comment | data-structures | for | operator-and | name-mangling | pep | mutable | copy | print-statement | list-mutation | file-handling | center | constructor | range | comprehension | conversion | logical-operation | global-variable | static-method | heap-memory ...