File tree Expand file tree Collapse file tree 1 file changed +26
-8
lines changed Expand file tree Collapse file tree 1 file changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -22,16 +22,34 @@ PyCharm
22
22
23
23
24
24
25
+ ## This set of Python Multiple Choice Questions & Answers (MCQs) focuses on “Regular Expressions”.
25
26
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
+ * * *
26
41
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:
34
51
``` python
35
- code
52
+ Answer: c
53
+ Explanation: It converts a given string into a pattern object .
36
54
```
37
55
* * *
You can’t perform that action at this time.
0 commit comments