πŸ“Š Python
Q. What will be the output of this code?
Code:
x = [1, 2, 3]
print(x * 2)
  • (A) [1, 2, 3, 1, 2, 3]
  • (B) [2, 4, 6]
  • (C) [1, 2, 3, 2]
  • (D) Error
πŸ’¬ Discuss
βœ… Correct Answer: (A) [1, 2, 3, 1, 2, 3]

Explanation: Multiplying a list by an integer repeats the list.

Explanation by: Mr. Dubey
Multiplying a list by an integer repeats the list.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
62
Total Visits
πŸ“½οΈ
10 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
88%
Success Rate