first post here on stack overflow :D
Firstly, at school currently i'm working on a little door entry system and most of the code (only short maybe 30 lines max) is at the school pc - however ive just downloaded Anaconda because i cant get python to download and im using Spyder,
And im trying to sort out a little error im getting so i can fix it at school, pretty much i want to allow the user to enter a code that will be stored into the 'code' variable and then if the 'code' is in the 'database' variable the door will open if not it'll tell you access is denied and loop the program for the next person/next attempt - What i have here to post is the bare minimum of my program but its pretty much the part im struggling with - i have had the program working multiple times with the codes being presented seperately but im looking on making them into a list instead for easier usability - and its a challenge thats been set 

```
while True:
    code = input ('Please enter your user ID ')
    database = ['001','002','003']
if code == database:
    print ('access granted')
else:
    print ('Acess denied')

```

Thats my code so far :D