πŸ“Š Python
Q. Which of the following options will give an error if
set1={2,3,4,5}?
  • (A) print(set1[0])
  • (B) set1[0]=9
  • (C) set1=set1+{7}
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Explanation: 1. Set1 is a python dictionary.
2. Dictionaries are used to store data values in key:value pairs.
3. Set1 has no key and value. That's why this will give an error.

Explanation by: Ram Sharma
1. Set1 is a python dictionary.
2. Dictionaries are used to store data values in key:value pairs.
3. Set1 has no key and value. That's why this will give an error.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
277
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
81%
Success Rate