0

why is it T F T T ?

Which is the correct output of this code ? a= (0) b= [0] ,[[0]] ,{0} , [(0)] for i in b : print(a in i )

20th Oct 2020, 4:41 PM
Curious Ant
Curious Ant - avatar
1 Answer
+ 5
(0) is basically 0 ,now it checks like 0 in [0] which is true 0 in [[0]] ,which is false as it is [0] not 0 0 in {0} ,which is true 0 in [(0)] which is true as (0) is same as 0
20th Oct 2020, 4:48 PM
Abhay
Abhay - avatar