Category Archives: Python

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

Python interactive help mode

Python provides an interactive help mode inside the interactive Python interpreter. This tutorial provides some basic on how to use the help mode. Continue reading

Posted in Python | Tagged , , | Leave a comment

Count the number of occurences using Counter() in Python

An easy way to count the number of occurrences of member in a list/tuple using Counter(). Can also be used to list the most common members. Continue reading

Posted in Python | Tagged , , | Leave a comment

How to list out Python reserved words

A Python command to list out the Python reserved words. Continue reading

Posted in Python | Tagged , | Leave a comment

Count the number of words using Python

How to count the number of words, the number of unique words, and the number of each word occurrences in a text file. Continue reading

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