小编Lui*_*lon的帖子

在Python 2.7中使用for打印水平

我有python的问题,我无法弄明白.我想在用户输入单词时打印一个单词的重复,然后他会告诉该单词将重复多少次.顺便说一句,我不能.这里代码到目前为止

b = raw_input 'enter word'
c = input 'enter the amount of time the word will repeat'

for g in range (c)
    print (b)
Run Code Online (Sandbox Code Playgroud)

就像你看到你可以看到输入的重复但在垂直线上,我怎么能水平打印?

python python-2.7

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

标签 统计

python ×1

python-2.7 ×1