Q. What is the output of [1, 2] * 2?
Solution:
The * operator repeats the list, so [1, 2] * 2 becomes [1, 2, 1, 2].
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.
The * operator repeats the list, so [1, 2] * 2 becomes [1, 2, 1, 2].
Strengthen Your Practice with our comprehensive question bank.