python randint和range区别

区别如下图所示:

总结:randint 包含左右索引,生成一个随机整数;
range包含左索引,不包含右索引,生成一个列表。

posted @ 2019-12-11 15:35  奈何技术不达标  阅读(1698)  评论(0编辑  收藏  举报