[Tutor] Need help with a login system

Steven D'Aprano steve at pearwood.info
Sat Jun 9 09:03:09 EDT 2018


On Sat, Jun 09, 2018 at 02:39:48PM +0200, Casper Rasmussen wrote:
> So I am trying to make a simple login system just for fun and found this
> video that has helped me a lot but there is a line I am not really sure how
> works.
> Screenshot at the bottom

Unless you edit your code with Photoshop, don't use screenshots to send 
pictures of code. Send the code itself. Just copy and paste it.

Not only are binary attachments like images, videos, sound files etc 
deleted by the mailing list, but screen shots make it hard for the 
visually impaired and blind to contribute to the discussion.

They also make it impossible for the recipients to work with the posted 
code, since it isn't text that can be copied and tested and edited, just 
pixels.


> The line I don't understand is:
> 
> user = {}
> 
> I understand the how list works but this list I can't figure out.

That's because it isn't a list.

https://docs.python.org/3/tutorial/datastructures.html#dictionaries



-- 
Steve


More information about the Tutor mailing list