Level 5 : Guess the output of the following code.


list = ['apple', 'banana', 'orange']
string = ', '.join(list)
print(string)
print(type(string))

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