i dont understand how to assign a value to store_open = none
i understand the logic of 'if' and 'in' and i also understand strings and lists - but i dont understand the 'none' item in store_open = none, and then change that to true or false. pretty sure its something simple. could someone check my code. sorry - beginner here!
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 = [false]
Jennifer NordellTreehouse Staff
Hi there! You're doing great, and yes, you clearly understand the logic. At some point, though, it seems you might have missed something about what is known as "built-in constants". There are a few of these in Python and they are documented here
None constant represents the absence of a value. Most programming languages have a similar thing although it can be named differently across languages. The same goes for
False. These are reserved words (when capitalized in precisely this manner) in Python.
Here's an example:
treehouse_student = True
I think you can get it with this hint but let me know if you're still stuck!