I want to write a program that prints a word 3 times. The first two iterations should have a space after them, but the 3rd line shouldn't.
Example of desired output: https://imgur.com/43pYOI9
This is the code I'm trying:
n = input("Enter a word: ")
for x in range(len(n)):
print((n[x]+" ")*3)
n.rstrip()
This is the output I'm getting - rstrip() doesn't seem to be working.
Any suggestions on how to fix this?