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


import re
str = 'python programming'
re.split('p', str)

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