小编Lan*_*Kim的帖子

如何打印长度达到输入整数的“1 2 3”序列?

例如:

input=7 -> print : 1 2 3 1 2 3 1
input=2 -> print : 1 2
Run Code Online (Sandbox Code Playgroud)

我只能使用下面的代码打印输入整数重复的整个“1 2 3”。(输入=2 -> 打印:1 2 3 1 2 3)

input=7 -> print : 1 2 3 1 2 3 1
input=2 -> print : 1 2
Run Code Online (Sandbox Code Playgroud)

python

2
推荐指数
1
解决办法
941
查看次数

标签 统计

python ×1