61.4k views
3 votes
Write an if statement to test if the variable letter holds h

1 Answer

6 votes

letter = put whatever value here

if "h" in letter:

print("The letter h is in the variable letter.")

else:

print("The letter h is not in the variable letter.")

User As Diu
by
8.5k points