qobjects = [
{
question: "Consider the following code:import re
txt = 'The rain in Spain'
x = re.findall('[a-c]', txt)
print(x)
What will be the printed result?",
options: [
"['a', 'a']",
"'The rin in Spin'",
"2"
],
correct: 0
},
{
question: "Consider the following code:import re
txt = 'The rain in Spain'
x = re.search('a', txt)
print(x.start())
What will be the printed result?",
options: [
"3",
"4",
"5"
],
correct: 2
},
{
question: "Consider the following code:import re
txt = 'The rain in Spain'
x = re.search('\\s', txt)
print(x.start())
What will be the printed result?",
options: [
"3",
"4",
"5"
],
correct: 0
},
{
question: "When using the re module to find a match, a match will return a Match object, but what is the return value when there is no match?",
options: [
"-1",
"None",
"0",
"Null"
],
correct: 1
}
]