Level 10 : What will be the output of the following Python code?


x = "abcdef"
i = "i"
while i in x:
    print(i, end=" ")

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