Level 1 : What will be the output of the following Python code?


re.match('sp(.*)am', 'spam')

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