Programming Language Python Tuple MCQ Question #3717
Single Choice Not Set

QWhat is the output of the following tuple operation
aTuple = (100,)
print(aTuple * 2)

ID: #3717 Python Tuple MCQ 211 views
Question Info
#3717Q ID
Not SetDifficulty
Python Tuple MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A TypeError
  • B (100, 100)
  • C (200)
Correct Answer

Explanation

We can use * operator to repeat the tuple values n number of times.

For example:

("abc",)*3 will return ('abc', 'abc', 'abc')

Share This Question

Challenge a friend or share with your study group.