Level 10 : What will be the output of the following Python code snippet?


string = "my name is x"
for i in ' '.join(string.split()):
    print (i, end=", ")

Author: KaivalyaG | Tags: string-iteration | 1736+ Python FAQs | Share
list-vs-tuple | inherit | string-slicing | oop | class-and-instance-variable | yield | choice | class-and-object | regex | matrix-list-comprehension | mathematics | gil | threading | functions | matrix | min-max-function | benefit | numpy | polymorphism | operand | function-and-scope | round | methods | list-indexing | complex | exponentiation | string-formatting | max-min | assignment-operator | while-and-for-loop | postfix | string-formatting | control-flow | list-comprehension | exception-handling | print-statement | data-type | boolean-and-non-boolean | overflow | precedence-and-associativity | matplotlib | command-line-parsing | default-mutable-argument | python-django | control-flow | list-comprehension | functional-programming | conditional-statement | array | filter-function | integer | object-attribute | type-conversion | datatype | python_version | version-check | shallow-copy | arithmetic-expression | map-function | logical-operator | file-handling | lambda | lists | round-function | numeric | lambda-function | classes | import-method | conversion | precedence | for | type-conversion | binary-operation | condition | loop | staticmethod | mysql | destructor | while-loop | built-in | built-in-function | asyncio-module | stack | design-principle | lambdas | copy | int | while-else-loop | compute | loops | assert | zfill-function | sum() | software-design | set-operation | sorted | iterable | statement | file | string-concatenation | decorator | def | list | dictionaries | expand-tab | goto-function | filter | call | split | enumerate() | random-function | recursion | update | version | list-operation | swapping | math | string-method | file-handling | else-statement | objects | escape-operator | typeerror | async | complex-number | immutability | global-keyword | global-variable | memory-management | collection | nested-loop | syntax-error | head-and-tail | data-structure | rollback | join | global-variable | encoding | pickling-&-unpickling | iterator | zip-function | pseudocode | oops | global | min-function | boolean | scientific-notation | tuple-unpacking | built-in-function | fabs-function | bitwise | turtle | syntax | list-slicing | logical-operation | sys | set | return-statement | mapping-function | format | regular-expression | method | package-management | operator-or | namespace | recurssion | memory | asyncio | variable | decimal | append | docstring | identifier | keyword | data-structures | exception | feature | exception-handling | attribute | mathematical-function | generator | context-manager | bitwise-operator | installation | zip | sorting | heap-memory | frozenset | class-and-inheritance | application | module | implementation | binary | data_structure | odd-number | loop-control | slicing | init | multithreading | file_handling | operator | touples | python-history | floating-point-precision | python | multiple-inheritance | __all__-attribute | random | virtual-environment | function-argument | function | __init_subclass__ | identity-operator | pandas | class | python-repl | basic | indexing | operators | conditional-statement | python-module | data-structure | comment | operator-and | dictionary | slice | thread | input-function | with-statement | descriptors | list-join | raise | syntax-error | operations | list-method | datetime | deep-copy | error-handling | math-copysign | center | dicts | data-type | debugging | string | access-modifier | input | virtual-environment | error | factorial-function | inheritance | identity-operator | string-iteration | sum-function | match | indentation | comprehension | string-method | counter-function | expression | list-mutation | sys-module | input-function | formal-and-actual-parameter | invalid-list | string-slicing | parameter | multiprocessing | control-statement | tuple | generators | interpreter | print | generators-in-python | operator-overloading | string-manipulation | type_conversion | syntaxerror | range | static-method | higher-order-function | counter | __future__ | arithmetic-operation | collections | pep | logical-operator | id-function | comparison | bitwise-operator | immutable-data-type | mutable | library | constructor | name-mangling | magic-method | namedtuple | encapsulation ...