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