πŸ“Š Python
Q. What will be the output of the following Python program?
Code:
def foo(x):
    x[0] = ['def']
    x[1] = ['abc']
    return id(x)
q = ['abc', 'def']
print(id(q) == foo(q))
  • (A) Error
  • (B) None
  • (C) False
  • (D) True
πŸ’¬ Discuss
βœ… Correct Answer: (D) True

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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