+ 1
[SOLVED] End="" only able to move one output horizontally
My code: word = input("Enter a phrase:") findW = input("Enter a letter to find:") position="" for c,position in enumerate(word): if findW in position: ans = "~"+str(c) print(ans) print(findW,"Appeared at position:",end =" ") output: a Appeared at position: ~1 ~3 ~7 How do i move the -3 and -7 at the same position as the ~ 1? i always have problem with end"" :(
2 Answers
+ 2
print(ans, end='')
+ 1
Lols, it works :/ , didnt know u can double end="" . Thanks Gopal