Here are some of the most recently published snippets!
Define and manage custom objects in python
This simple snippet shows how to define a basic custom object (‘myInfo’) and how to manage it into a dictionary. You can define the object’s attributes and reference to them while accessing the data.
How to populate a dictionary in python
This code shows how to populate a dictionary, using the built-in method setdefault. If the key does not exist, it will be created setting its value too. Otherwise the new value will be appended to the existing ones. In this way the key existence in automatically checked by python during run time.