更新一个值,直到它等于某个值

时间:2016-03-05 19:47:59

标签: arrays if-statement while-loop iteration

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)

我不明白如何在“b”50.1233中创建每个值 我很困惑。

0 个答案:

没有答案