Stock program in python