RE_Lambda_Comprehension

RE_Lambda_Comprehension

Professional Development

30 Qs

quiz-placeholder

Similar activities

Flutter_Q3

Flutter_Q3

Professional Development

29 Qs

Infin'IT

Infin'IT

Professional Development

31 Qs

PS Unit 4 Iteration Quiz Review

PS Unit 4 Iteration Quiz Review

1st Grade - Professional Development

30 Qs

Introdução ao Controle de Fluxo

Introdução ao Controle de Fluxo

Professional Development

33 Qs

Python: Quiz 2.03 - Basic Data Types

Python: Quiz 2.03 - Basic Data Types

Professional Development

25 Qs

Тест остаточных знаний

Тест остаточных знаний

Professional Development

25 Qs

Quiz 3.4

Quiz 3.4

Professional Development

30 Qs

INPR - Programação em Python Review

INPR - Programação em Python Review

Professional Development

33 Qs

RE_Lambda_Comprehension

RE_Lambda_Comprehension

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Lilesh Pathe

Used 1+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does the regular expression r"\d+" match?

A single digit

One or more digits

Any non-digit

Only letters

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What function is used to check if a regex pattern matches at the beginning of a string?

re.match()

re.findall()

re.sub()

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does re.findall(r"[A-Z]", "Hello World!") return?

['Hello', 'World']

['H', 'W']

['e', 'o']

[]

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which character matches any single character in regex?

*

?

.

^

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What does re.sub(r"\s", "_", "Python is fun") return?

'Python_is_fun'

'Python is fun'

'Python_is_fun_'

'Python_isfun'

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which regex pattern matches a valid email address?

r"[a-z]+@[a-z]+\.[a-z]+"

r"\d+@\d+\.\d+"

r"\w+\.\w+"

r"[A-Z]+@[A-Z]+"

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of re.match(r"py", "python").group()?

'py'

'python'

'pyt'

Error

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?