Level 1 : What is the output of the following code?


str = "Welcome to the\n jungle"
print(str.splitlines())

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