(Mar-10-2017, 09:30 PM)wavic Wrote:listA = list(range(0,101,5)) for index, element in enumerate(listA, 1): print("Item no. {} is {}".format(index, element))
@wavic I don't understand this version of the code. I would have to learn more about Python to be able to grasp this. But thank you very much for your advice.
(Mar-11-2017, 08:04 AM)Skaperen Wrote: this is showing the perl philosophy that there is more than one way to do it. so why not putstr()
aroundlistA[i]
so the original method works as intended? what is wrong with minimal change?
# loop in list listA = list(range(0,101,5)) for i in range(len(listA)): print('Item no. ' + str(i+1) + ' is: ' + str(listA[i]) )[/i][/i]
@Skaperen yeah this worked! Thanks so much!