why is it T F T T ? | Sololearn: Learn to code for FREE!

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 )

10/20/2020 4:41:17 PM

Curious Ant

1 Answer

New 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