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


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

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