#两种方法实现1-100储存在列表
#方法(1)
nums=[]
for i in range(1,101):
nums.append(i)
print(nums)
#方法(2)
nums=[i for i in range(1,101)]
print(nums)
#列表储存student1,student2,student3...
names=["student"+str(i) for i in range(1,101)]
print(names)
#列表储存student01,student02,student03...
names=["student0"+str(i) if i<10 else "student"+str(i) for i in range(1,101)]
print(names)
#使用列表储存1,3,5,7,,,,
nums=[i for i in range(1,100)if i%2==1]
print(nums)