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