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