McqMate
Sign In
Hamberger menu
McqMate
Sign in
Sign up
Home
Forum
Search
Ask a Question
Sign In
McqMate Copyright © 2025
→
Computer Science Engineering (CSE)
→
Python Programming
→
What is the output of the following prog...
Q.
What is the output of the following program : print 'abcefd'.replace('cd', '12')
A.
ab1ef2
B.
abcefd
C.
ab1efd
D.
ab12ed2
Answer» B. abcefd
3.7k
0
Do you find this helpful?
46
View all MCQs in
Python Programming
Discussion
Bass Junior
1 year ago
Many thanksfor your help,pls. God richly bless you.
0
Login to comment
Related MCQs
What is the output of the following program? import sys L1 = tuple() print(sys.getsizeof(L1), end = " ") L1 = (1, 2) print(sys.getsizeof(L1), end = " ") L1 = (1, 3, (4, 5)) print(sys.getsizeof(L1), end = " ") L1 = (1, 2, 3, 4, 5, [3, 4], 'p', '8', 9.777, (1, 3)) print(sys.getsizeof(L1))
What is the output of the following program? L = [1, 3, 5, 7, 9] print(L.pop(-3), end = ' ') print(L.remove(L[0]), end = ' ') print(L)
What is the output of the following program : i = 0 while i < 3: print i print i+1
What is the output of the following program : i = 0 while i < 3: print i i += 1 else: print 0
What is the output of the following program : i = 0 while i < 5: print(i) i += 1 if i == 3: break else: print(0)
What is the output of the following program? T = (1, 2, 3, 4, 5, 6, 7, 8) print(T[T.index(5)], end = " ") print(T[T[T[6]-3]-6])
What is the output of the following program? from math import sqrt L1 = [x**2 for x in range(10)].pop() L1 + = 19 print(sqrt(L1), end = " ") L1 = [x**2 for x in reversed(range(10))].pop() L1 + = 16 print(int(sqrt(L1)))
What is the output of the following piece of code? #mod1 def change(a): b=[x*2 for x in a] print(b) #mod2 def change(a): b=[x*x for x in a] print(b) from mod1 import change from mod2 import change #main s=[1,2,3] change(s)
What is the output of the following program : print 0.1 + 0.2 == 0.3
What is the output of the following program : def myfunc(a): a = a + 2 a = a * 2 return a print myfunc(2)