Dicrionary python error
Go to solution
Solved by thiagosch,
you're missing commas (separating each dictionary) and the closing "}" at the end of the main dictionary
pswdic = { "A" : { "Username" : "AB1", "Password" : "12345" }, "B" : { "Username" : "Cool1", "Password" : "qwerty!" }, "C" : { "Username" : "No_scope", "Password" : "nO-ScOpE" }, "D" : { "Username" : "Elite007", "Password" : "IAmSuperCool1" } }
don't forget that not only A B C and D are dict, pswdic also is dict, so you have a dict of dicts, if you think of it like this:
D_A = {"user":"test"} D_B = {"user":"test2"} D_C = {"user":"test3"} pswdic = { "A":D_A, "B":D_B, "C":D_C }
could make it easy to understand
Saludos!

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now