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