MCQ Single Best Answer Difficult

QThe output of the expression {i:j for i in "abcd" for j in "kiwi"} is _______.

ID: #20274 Create Objects in Python 103 views
Question Info
#20274Q ID
DifficultDifficulty
Create Objects in PythonTopic

Choose the Best Option

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

  • A {'a': 'k', 'd': 'i', 'c': 'w', 'b': 'i'}
  • B {'a': 'kiwi', 'd': 'kiwi', 'c': 'kiwi', 'b': 'kiwi'}
  • C Reuslts in error
  • D {'a': 'i', 'd': 'i', 'c': 'i', 'b': 'i'}
Correct Answer: Option D

Explanation

{‘a’: ‘i’, ‘d’: ‘i’, ‘c’: ‘i’, ‘b’: ‘i’}

Share This Question

Challenge a friend or share with your study group.