range(5)是列表 xrang(5)是生成器 每次调用 xrange(5),返回相应的值,比起range(5) 直接返回一个列表,性能好。 转载于:https://www.cnblogs.com/IDRI/p/7098559.html