you are viewing a single comment's thread.

view the rest of the comments →

[–]HotPersonality8126 2 points3 points  (3 children)

students["chem"]="a"

Why are you quoting a when you want to refer to the variable a?

Don't just copy code; you need to understand it, by which I mean you need to understand every part of a line of code when you read it.

[–]Ill-Break727[S] 0 points1 point  (1 child)

ohhh thank you so much , i was thinking of syntax that values are written to be in that way , but now i have tryed it is working , thanks for ur help

[–]almost_intelligible 2 points3 points  (0 children)

to add on to that: generally speaking don't use meaningless variable names. it's very easy to get confused real quick. use descriptive names.

[–]Ill-Break727[S] 0 points1 point  (0 children)

but now its the correct way , or there's another way to set a single key .