for i in range(5): print("Hello world" + str(i)) r = range(5) # 范围支持序列通用操作 print(r) print(min(r)) print(max(r)) print(len(r)) print(type(r)) r = range(3, 12) print(r) for i in r: print(i) r = range(1, 21, 2) # 范围可以加步长值 print(r) for i in r: print(i) print(r.index(7)) print(r.count(1))