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