0
Confusion in 'in' operator
What is the output of num=[1,2,[3,4],5] print(3 in num) please tell the output with reason. how to get "true" in the answer?
1 Odpowiedź
+ 2
The output would be "False". In the list "num", we don't have the number 3. We have the number 3 in a list nested within the list "num". So, using the "in" operator, you can check whether a list has a specific value.