Skip to content

循环语句

循环

vine
for i in 1..10:
    print(i)
end

遍历

vine
let a = [100, 200, 300, 400, 500]
for i in a :
    print("xuran",i)
end

遍历字典

vine
let a = {
    test:"1xuran",
    test2:"2xuran",
    test3:100
}

for i,v in a :
    print("xuran",i,v)
end

MIT Licensed