#coding=utf-8
import random
names=['刘一','陈二','张三','李四','王五','赵六','孙七','周八','吴九','郑十']
index= random.randint(0,len(names)-1)
print names[index]
Python 小案例 随机点名
最新推荐文章于 2024-06-26 15:27:43 发布
#coding=utf-8
import random
names=['刘一','陈二','张三','李四','王五','赵六','孙七','周八','吴九','郑十']
index= random.randint(0,len(names)-1)
print names[index]