我有一个列表,并在每个项目上迭代执行一个函数。我正在尝试打印出脚本在迭代过程中的距离。问题是我不容易得到这个职位。下面是我目前所拥有的,但它会生成一个ValueError: 'item' is not in list:for i in mylist:我的目标是输出:2 out of 3Done!是相关的,因为它试图在列表中查找位置,但是有没有一种在不使用</e
是否有任何方式range不使用list()打印数组?def every_three_nums(start): if start <= 100: # thisreturns an array but if I print(range(start, 101, 3)), it doesn't else:这会返回一个数组,但是如果我是print(r