27 Jun
As everyone is probably aware by now, in Python 3 dict.keys(), dict.values() and dict.items() will all return iterable views instead of lists. The standard way being suggested to overcome the difference, when the…
Python dictionaries are unordered, but you can extract the keys and values and sort them yourself in a list.lets say you have this dictionary:{’a': 2, ‘b’: 4, ‘c’: 3, ‘d’: 1}.. and you want to convert it into a list,
26 Jun
Sometimes I’ll want to run a query against a MySQL database from Python that returns a large result set. So large in fact that Python hits a memory error.One way around this is to have the Python MySQL library…
24 Jun
Django snippets: Command to dump data as a python script. Extremely useful—dumps the data for an application as an executable Python script which will re-import it in to another database without any risk of colliding…
Have a rather nice older machine here, P4 with a reasonable video card and memory. Should be a kick-arse Linux machine for our niece and nephew. Except that Ubuntu can't seem to see the disks. It's nothing…
Click Here! Our brand new community page features all of the top blogs on Python.
Take a look inside to see the latest rankings of all the top blogs and discover exciting new blogs that you have
never even heard of. If you have a blog on Python, find out how to become a community leader!