Python Python Basics (2015) Logic in Python Membership

I need you to make an if condition that sets store_open to True if time is in the store_hours list. Otherwise, if time i

i am not getting right answer
time = 15

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

if time in store_hours:
    store_open = True
    store_open = False

1 Answer

Jennifer Nordell
Jennifer Nordell
Treehouse Staff

Hi there! Your logic is fine and your syntax is just fine, too. I had to look at this for a bit before I spotted it. Take a good look at the list in store_hours. Somehow a runaway semicolon got into the list. The list should start with [9, 10, 11, but yours starts with [9, 10 1;1... If I remove the semicolon between the two 1s that should make up 11, your code passes with flying colors!

Hope this helps! :sparkles: