long list of numbers
问题 I want to write a long list of numbers in python, but I don't want to enter the numbers one by one because that's boring. So, how can I do that? For the ones who are familiar with MATLAB, I want to write something witch looks 1:100, but I don't know how to write it in python! By the way, I can append numbers for a one-element-list in a loop but I am looking for something mostly like a built in operator. 回答1: Do you want something like the builtin range function? >>> range(1,10) [1, 2, 3, 4, 5