You can just construct a list from the range object: my_list = list(range(1, 1001)). This is how you do it with generators in python2.x as ...
確定! 回上一頁