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


print('abcdefghijfg'.split('fg', -1))

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