Python Python Basics (2015) Logic in Python Membership

Tiberiu Gavris
Tiberiu Gavris
1,785 Points

Where is the error?

Where is the error?

membership.py
time = 15

store_open = None
store_hours = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
if time in store_hours:
     store_open(True)
else:
    store_open(None)

1 Answer

Sneha Nagpaul
Sneha Nagpaul
10,123 Points

You are calling store_open like a function: a(True). You want variable assignment: a = True.