πŸ“Š Python
Q. What is the output of the following piece of code?
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)
  • (A) [2,4,6].
  • (B) [1,4,9].
  • (C) [2,4,6].
  • (D) There is a name clash
πŸ’¬ Discuss
βœ… Correct Answer: (D) There is a name clash

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
166
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
94%
Success Rate