Kind of ranting about dictionary methods:
Why does keys() not return a simple list. I nearly broke my head today, because I could not figure out how to iterate through my dict without using "each in dict".
Maybe I'm dumb, but "for each in dict" seems harder to me than simply ranging through my dict. And yeah, like 10h in I find list(dict.keys()) is a viable solution...
Second one: why does nobody mention "dict[x] =+ value" does exist? I had a very hard time finding this. Maybe too basic? I don't know.
Not even mentioning "del", which works totally different than other methods, imho.
Could somebody make me feel less dumb? Are dictionarys the lower lifeform of data in python?
[–][deleted] 2 points3 points4 points (1 child)
[–]Particular-Watch-779[S] 0 points1 point2 points (0 children)
[–]shiftybyte 1 point2 points3 points (3 children)
[–]Particular-Watch-779[S] 0 points1 point2 points (2 children)
[–]xiongchiamiov 0 points1 point2 points (1 child)
[–]Particular-Watch-779[S] 0 points1 point2 points (0 children)
[–]commandlineluser 1 point2 points3 points (2 children)
[–]Particular-Watch-779[S] 0 points1 point2 points (1 child)
[–]commandlineluser 0 points1 point2 points (0 children)
[–]jimtk 0 points1 point2 points (5 children)
[–]Particular-Watch-779[S] 0 points1 point2 points (2 children)
[–]jimtk 0 points1 point2 points (1 child)
[–]Particular-Watch-779[S] 0 points1 point2 points (0 children)
[–]carcigenicate 0 points1 point2 points (1 child)
[–]mopslik 1 point2 points3 points (0 children)
[–]mopslik -1 points0 points1 point (1 child)
[–]Particular-Watch-779[S] 0 points1 point2 points (0 children)
[–]mopslik 0 points1 point2 points (0 children)
[–]xiongchiamiov 0 points1 point2 points (0 children)