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


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

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