标签:class 范围 print pytho range 位置 面试 python2 code
例题:
# s = range(1,10) # 面试大坑 python2 和 python3
# print(s) # 范围
range步长
# for i in range(1,10,2): # (起始位置,终止位置,步长)
# # range(10) 指定了终止位置,起始位置默认是0
# print(i)
# for i in range(100,-11,-1):
# print(i)
# for i in range(1):
# print(i)
标签:class 范围 print pytho range 位置 面试 python2 code
原文地址:https://www.cnblogs.com/zanao/p/10982417.html