[Tutor] (no subject)

Mats Wichmann mats at wichmann.us
Mon Feb 10 14:56:24 EST 2020


On 2/10/20 12:36 PM, Alfie Lee wrote:
> 
> 
> Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
> 
> If say I had a variable called ‘username’, and a list of usernames called ‘usernames’; how would I write it so that the programme will check if that username is in the usernames list?
> this would be using an if statement if possible.
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
> 


if username in usernames:




More information about the Tutor mailing list