码迷,mamicode.com
首页 > 其他好文 > 详细

第5课

时间:2020-01-21 16:05:06      阅读:69      评论:0      收藏:0      [点我收藏+]

标签:input   class   dom   while   tmp   random   inpu   break   div   

1a = [43,34,none,"break",12]
print(a[0]+a[2])

2import random
a= ["print","input", "while", "if", "else", "break","continue"]
while True:
    index = random. randint(0,6)
    print(a[index])

3a = ["print", "input","while", "if", "else", "break","continue"]
tmp = a[1]
a[1] = a[5]
a[5] = tmp
print(a)

4超过了列表长度

  

第5课

标签:input   class   dom   while   tmp   random   inpu   break   div   

原文地址:https://www.cnblogs.com/liuliugeren/p/12221840.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!