If statement with input method (Python)

I’m a beginner in programming and I needed help with these line of code… what i’m trying to do is if my input is in the list then I want it to do a certain thing… here is the code

pasw = [‘1234’,‘4321’]
nam = input(‘password :’)
if nam == pasw:
print(‘accepted’)

if you see what i’m trying to do can you help me make it accept something in the list?

Please start a new post with a screenshot of what you’ve tried so far so we can explain where your issues are and how to fix them.

1 Like

@DemonZer0
I split your post in a new topic, avoid digging up old topic, as @Nick_Boyts mentioned
Are you sure that your request concerns DynamoBim? (there is no Python console in Dynamo)

hi,
if you are trying to do something in dynamo you have to do as @Nick_Boyts said and post a screenshot. but if you are starting learning python and stubled upon a relevant python post on this forum. You can find you answer here:

other useful forums/refrence sites for learning python:

https://www.w3schools.com/python/

2 Likes

Try this…Python if…else