Q. What is the output of print(*[1, 2, 3], sep=’-‘)?
Solution:
print(*[1, 2, 3], sep=’-‘) unpacks the list and joins with ‘-‘, outputting ‘1-2-3’.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.
print(*[1, 2, 3], sep=’-‘) unpacks the list and joins with ‘-‘, outputting ‘1-2-3’.
Strengthen Your Practice with our comprehensive question bank.