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']
Question
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']
Solution
Welcome to hyderabad
Similar Questions
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
Select the correct answerWhat is the output of the following program?ct1 = '{2}, {0} and {1}'.format('p', 'q', 'r')ct2 = '{0}{1}{0}'.format('oprq', 'qrp')print(ct1, ct2)Optionsa, b and c abracadcadr, p and q oprqqrpoprqp, q and r pqrprpdpqrp r, q and p pqrprpd0
10. What is the output when the following code is executed ?"Welcome to Python".split()*4 points[“Welcome”, “to”, “Python”](“Welcome”, “to”, “Python”){“Welcome”, “to”, “Python”}“Welcome”, “to”, “Python”
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 answer What will be the output of the following program? for i in ''.join(reversed(list('Python'))): print(i) Select all the correct statements given below. Options nohtyP n o h t y P Python P y t h o n
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.