Level 5 : What will be the output of the following code?


x = "abcdef"

i = "i"

while i in x:

    print(i, end=" ")

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