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


import re

txt = "The rain in Spain"
x = re.search(r"\bS\w+", txt)
print(x.span)

Author: KaivalyaG | Tags: regular-expression | 1736+ Python FAQs | Share
attribute | data_structure | dicts | data-structure | with-statement | installation | else-statement | bitwise-operator | factorial-function | expand-tab | pickling-&-unpickling | goto-function | call | head-and-tail | random-function | heap-memory | virtual-environment | lists | syntax-error | touples | loops | decimal | memory | update | python-repl | type-conversion | list-comprehension | dictionary | assert | datetime | zip | class | name-mangling | oops | regex | list-indexing | python-history | nested-loop | default-mutable-argument | list | exception-handling | functional-programming | tuple | split | random | built-in-function | python_version | input-function | recurssion | string-manipulation | set-operation | regular-expression | exponentiation | sorting | pandas | choice | list-method | precedence | error | escape-operator | implementation | namespace | exception | operator-and | syntaxerror | operator | oop | class-and-instance-variable | string-formatting | condition | asyncio | turtle | arithmetic-operation | string-method | data-type | file | rollback | operations | import-method | int | indentation | numpy | slice | thread | bitwise-operator | formal-and-actual-parameter | descriptors | postfix | complex-number | file_handling | filter-function | sorted | software-design | frozenset | debugging | iterable | string-concatenation | type_conversion | print | list-vs-tuple | data-structures | memory-management | round-function | design-principle | decorator | counter | matrix | variable | overflow | indexing | center | built-in | method | format | __future__ | file-handling | integer | control-statement | multiple-inheritance | command-line-parsing | methods | mysql | filter | python-module | min-max-function | mathematical-function | while-loop | syntax | math-copysign | threading | operand | encapsulation | interpreter | application | logical-operator | typeerror | list-mutation | global-variable | for | list-operation | function-and-scope | multiprocessing | async | data-structure | file-handling | classes | raise | def | mutable | functions | compute | input | collection | string | slicing | module | lambda | destructor | objects | return-statement | syntax-error | yield | operator-overloading | object-attribute | polymorphism | function-argument | array | complex | numeric | conditional-statement | magic-method | feature | operators | arithmetic-expression | access-modifier | zip-function | operator-or | constructor | encoding | benefit | exception-handling | conditional-statement | generators-in-python | namedtuple | conversion | lambda-function | binary-operation | error-handling | string-formatting | higher-order-function | virtual-environment | bitwise | list-slicing | parameter | logical-operation | assignment-operator | enumerate() | binary | identity-operator | string-method | collections | lambdas | identity-operator | __init_subclass__ | data-type | sum() | loop-control | staticmethod | multithreading | join | comparison | sum-function | invalid-list | keyword | zfill-function | scientific-notation | library | list-comprehension | immutable-data-type | fabs-function | floating-point-precision | pseudocode | version | function | swapping | match | string-slicing | while-else-loop | append | matplotlib | class-and-inheritance | generators | counter-function | dictionaries | list-join | odd-number | tuple-unpacking | inheritance | immutability | type-conversion | global-keyword | min-function | inherit | loop | recursion | python | expression | comprehension | round | basic | package-management | class-and-object | deep-copy | python-django | input-function | pep | built-in-function | asyncio-module | global | identifier | math | range | print-statement | context-manager | precedence-and-associativity | static-method | mapping-function | id-function | mathematics | version-check | docstring | gil | max-min | init | string-slicing | logical-operator | control-flow | statement | datatype | map-function | while-and-for-loop | string-iteration | global-variable | set | __all__-attribute | boolean | copy | control-flow | stack | sys-module | boolean-and-non-boolean | iterator | comment | generator | matrix-list-comprehension | shallow-copy | sys ...