how to check if item is in the variable python

Solutions on MaxInterview for how to check if item is in the variable python by the best coders in the world

showing results for - "how to check if item is in the variable python"
Anis
24 Jun 2017
1a ="item"
2if "i" in a :
3  print("found in list")
4else:
5  print("not in list")
Catalina
05 Jul 2018
1if x:
2  print(x)
3else:
4  print(x is empty)