Using map with a dictionary in Python

, Categories: Python / Tech .

When you have a dictionary in Python like this : mydict={'first':1, 'second':2, 'third':3} and you want to get the values into a list with a certain order you can do this : mylist=[mydict['first'], mydict['second'], mydict['third']] However, that can get a bit verbose if there are a lot of entries. For every entry you have to repeat ‘mydict’. An elegant way of solving this is using the map function : mylist=map(mydict.

Read more →

Windsor, Stonehenge and Blenheim

, Categories: Travel .

A few weeks ago, I took my parents on a trip to Windsor castle, Stonehenge and Blenheim. The weather was great and the traffic was fine as well.

The moat at Windsor castle, now a garden

The moat at Windsor castle, now a garden

Read more →

Australia

, Categories: Travel .

I just got back from a brilliant 4 week trip to Australia. It’s a brilliant country, well worth a visit.

Opera House

Opera House

Read more →

India again

, Categories: Travel .

Here’s another picture of India. The staircase in a house in Jaisalmer is being cleaned.

Inside a house in Jaisalmer

Inside a house in Jaisalmer

Read more →

New York Times reader

, Categories: Uncategorized .

The New York Times has a great HTML reader : http://prototype.nytimes.com/gst/articleSkimmer/ They’re in financial trouble, but they seem to get how the Internet should work.

Read more →
Previous page Next page