Python: Будьте осторожны с .popitem()

Используйте .popitem(), только когда вы точно уверены, что элемент надо удалить.

Если надо получить значение, не удаляя элемент, используйте .copy().popitem().

 
0
Kudos
 
0
Kudos

Now read this

Generating random terrains in Enu 0.2

Enu is an interactive programming sandbox that helps learn programming through game creation. The author made it with children convenience in mind so it’s great for teaching kids programming. Just days ago, a long-awaited Enu 0.2 was... Continue →