Select the correct answerWhat will be the output of the following Python code?import reline = 'how are you'result = re.match(r'(.*) (.*?) (.*)', line)print(result.group(2))Optionsyouarehow are youhow
Question
Select the correct answerWhat will be the output of the following Python code?import reline = 'how are you'result = re.match(r'(.) (.?) (.*)', line)print(result.group(2))Optionsyouarehow are youhow
Solution
are
Similar Questions
What will be the output of the following Python code?import reline = 'how are you'result = line.match(r'(.*) (.*?) (.*)', line)print(result.groups())Options('how', 'are', 'you')(how, are, you)(‘how’, ‘you’)‘how are you
Select the correct answerWhat will be the output of the following Python code?import re print(re.sub('A', 'B', 'CCCCCC', count=2))OptionsABCCCC(‘CCCCCC')CCCCCC(‘ABCCCC’)
Select the correct answerWhat will be the output of the following Python code?print('*', "abcde".center(6), '*', sep='')Options* abcde**abcde ** abcde ** abcde *
Choose the correct answerWhat is the output of the following program?import resentence = 'Welcome to hyderabad'matched = re.match(r'(.*) (.*?) (.*)', sentence)print(matched.group())Options'Welcome', 'to', 'hyderabad'Welcome to hyderabad{'Welcome', 'to', 'hyderabad'}['Welcome', 'to', 'hyderabad']
What will be the output of the following Python code snippet?xyz = "How are you?"for k in ' '.join(xyz.split()): print (k, end=", ")OptionsH, o, w, , a, r, e, , y, o, u, ?,How, are, you?,errorH, o, w, , a, r, e, , y, o, u, ?
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.