如何在单个命令行中多次使用"选择".我想使用命令'choice',如下所示 -
>>> l ['9', '10', '1', '2', '3'] >>> choice(l) '2' >>> choice(l)*3 '222'
我需要生成三个不同的值,l而不是相同数量的三倍.
l
python python-3.x
python ×1
python-3.x ×1