Answers for "python if statement in variable"

1

how to check if item is in the variable python

a ="item"
if "i" in a :
  print("found in list")
else:
  print("not in list")
Posted by: Guest on June-24-2021
1

how to use variables with if statements python

if choice == 'video games' or choice == 'Video Games' or choice == 'Video games' or choice == 'a)' or choice == 'a':
Posted by: Guest on December-15-2020

Code answers related to "python if statement in variable"

Python Answers by Framework

Browse Popular Code Answers by Language