samedi 5 mars 2016

Update a value till it equals a certain value

a = 50.1233  # Need this value for every value in "b"

b = [50.1233,40.1241,52.1233,5.4124,12]

b_new=[]
for i in b:
    b_new.append(i)
    print(i)
    while i < b:
        i=i+1
        print(i)

I don't understand how to make every value in "b" 50.1233 I am confused.

Aucun commentaire:

Enregistrer un commentaire