Python Python Basics (2015) Logic in Python Membership

Mamadou Diene
Mamadou Diene
Python Web Development Techdegree Student 415 Points

See that time variable? That's what time it currently is, at least for this test. But, when you

i don't see why this code isn't working?
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
    store_open = False

1 Answer

Steve Hunter
Steve Hunter
Treehouse Moderator 57,627 Points

HI there,

Try indenting your else back to be the same as the if level.