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