Processing Items In List In Python