Single Choice Not Set

QWhat will be the output after the following statements?
x = ['a', 'b', 'c', 'A', 'B', 'C']
x.sort(key=str.swapcase)
print(x)

ID: #3994 Python Built-in Functions MCQ 628 views
Question Info
#3994Q ID
Not SetDifficulty
Python Built-in Functions MCQTopic

Choose the Best Option

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

  • A TypeError
  • B ['a', 'b', 'c', 'A', 'B', 'C']
  • C ['a', 'A', 'b', 'B', 'c', 'C']
  • D ['A', 'B', 'C', 'a', 'b', 'c']
Correct Answer

Explanation

['a', 'b', 'c', 'A', 'B', 'C']

Share This Question

Challenge a friend or share with your study group.