I want to round a list of numbers to basically remove all the decimal places or even just convert them to integers.
So this is what I've tried and I just can't get this to work.
I'm just not getting this.
Thanks
So this is what I've tried and I just can't get this to work.
Code:
myList = [10.5,25.1,350.6,4,5,6] #declare my list
for i in range(len(myList)):
myList[i] == round(i,0) #tries to round all numbers.
print myList
#other Attempt
for i in range(len(myList)):
myList[i] == int(i) #tries to make i into an integer
print myList
#other attempt
for i in myList:
int(i)
Thanks
Comment