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