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