Category Archives: Python

Python: Swapping the keys and values of a dictionary

A function to swap the keys and immutable values of a dictionary. Continue reading

Posted in Python | Tagged , , | Leave a comment

My VIM .vimrc file for working with Python

A VIM .vimrc sample file for working with Python. Continue reading

Posted in Python | Tagged , , | 10 Comments

Dive into Python 3

Dive into Pyhton 3 book by Mark Pilgrim. Continue reading

Posted in Python | Tagged , , | Leave a comment

Python: How to convert a dictionary into a list of key-value

Using the list() function, we can convert a dictionary into a list of key-value tuple. Continue reading

Posted in Python | Tagged , , , | Leave a comment

Python: Remove items from a list that occur in another list

Suppose that you have two list x and y. How to remove items from list x that occur in list y? Continue reading

Posted in Python | Tagged , | Leave a comment