python随机数求和的方法: 1、使用“import random”导入random模块 2、使用“random.randint()”可以产生随机数。用for循环生成多个随机数,然后相加就可以了 执行结果如下: