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


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

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