diff --git a/1.py b/1.py new file mode 100644 index 0000000..d7bc70b --- /dev/null +++ b/1.py @@ -0,0 +1,8 @@ +name=input("啥?") +a=input("多少?") +hero=['蝙蝠侠',40,'刀哥',50,'cheems',100,'刘华强',200] +for i in range(len(hero)): + if i%2==1 and hero[i]>=int(a): + hero.insert(i-1,name) + hero.insert(i,a) +print(hero)