I'm working on commands by telling them making a short sentence, asking how many to appear and prints it out that goes like this:
a=eval(input("Type something in short: "))
b=eval(input("How many?: "))
for b in a:
for a in range(b):
I am guessing your objective is to print
b number of times.
For that, you don't need to even use a loop. Just do :
print(a*int(b)) In : Type something in short : "abc" In : How many?: "3" Out : abcabcabc
Now, incase you wanted the string in new line, just add
\n to the string.
print((a+'\n')*int(b)) In : Type something in short : "abc" In : How many?: "3" Out : abc abc abc
As for the error in your code, you have used an extra
for loop and have a few mistakes. It should be :
for i in range(b): print(a)