Skip to content

Commit 073e4ee

Browse files
Multiple Choice questions
1 parent cf73b7c commit 073e4ee

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

RegEx/README.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,34 @@ PyCharm
2222
2323

2424

25+
## This set of Python Multiple Choice Questions & Answers (MCQs) focuses on “Regular Expressions”.
2526

27+
## Question_1: Which module in Python supports regular expressions? ##
28+
Question:
29+
```python
30+
a) re
31+
b) regex
32+
c) pyregex
33+
d) none of the mentioned
34+
```
35+
Answer:
36+
```python
37+
Answer: a
38+
Explanation: re is a part of the standard library and can be imported using: import re.
39+
```
40+
* * *
2641

27-
## Question_1: ##
28-
**Description:**
29-
30-
31-
***Hints:***
32-
Consider use range(#begin, #end, #step) method.
33-
42+
## Question_2: Which of the following creates a pattern object? ##
43+
Question:
44+
```python
45+
a) re.create(str)
46+
b) re.regex(str)
47+
c) re.compile(str)
48+
d) re.assemble(str)
49+
```
50+
Answer:
3451
```python
35-
code
52+
Answer: c
53+
Explanation: It converts a given string into a pattern object.
3654
```
3755
* * *

0 commit comments

Comments
 (0)