Sail E0 Webinar
Question
Which of the following lines of code will result in an error?
Options:
A .  s={abs}
B .  s={4, 'abc', (1,2)}
C .  s={2, 2.2, 3, 'xyz'}
D .  s={san}
Answer: Option D


The line: s={san} will result in an error because 'san' is not defined. The line s={abs} does not result in an error because abs is a built-in function. The other sets shown do not result in an error because all the items are hashable.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers