Re: [Tutor] Need help with a login system

2018-06-09 Thread Steven D'Aprano
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
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Need help with a login system

2018-06-09 Thread Casper Rasmussen
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

The line I don't understand is:

user = {}

I understand the how list works but this list I can't figure out. The
reason why I want to know how it works is so I can put in users before the
program launches.

The program works fine right now but I as said I can't figure out how to
put in users before the program launches.

(Mine is not  identical to the screenshot but because I am danish I
figured it would only be confusing if I send a screenshot with danish texts
in it)

Many thanks in advance


Best regards

Casper
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor