第5课
Posted liuliugeren
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了第5课相关的知识,希望对你有一定的参考价值。
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课的主要内容,如果未能解决你的问题,请参考以下文章