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