Python Python Basics (2015) Logic in Python Membership

How do I make store_open True

How do I make 'store_open' True if time is in store_hours and False if it isn't.

membership.py
time = 15

store_open = None
store_hours = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18]

if time in store_hours:
    print("True")
else:
    print("False")

1 Answer

You need to return True, not print() it.