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