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