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