[python] Generate a sequence of numbers in Python