πŸ“Š Python
Q. What is the output of the following code?
Code:
print(type([]) is list)
  • (A) True
  • (B) False
  • (C) list
  • (D) TypeError
πŸ’¬ Discuss
βœ… Correct Answer: (A) True

Explanation: `type([])` returns `<class 'list'>`, and `is list` checks identity, which is `True` in this case.

Explanation by: Mr. Dubey
`type([])` returns `<class 'list'>`, and `is list` checks identity, which is `True` in this case.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
64
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
93%
Success Rate