我正在编写一个读取三行输入的程序。第一行将是一个单词,然后是要重复的多个字符,然后是重复的多个字符。但不幸的是,我无法做到这一点,任何人都可以通过查看我的代码来指导我。谢谢
word = raw_input("Enter the word: ")
length = int(raw_input("Enter the repeat length: "))
count = int(raw_input("Enter the repeat count: "))
print word.repeat() * count
I want this sort of output:
Enter the word: banana
Enter the repeat length: 2
Enter the repeat count: 3
banananana