I'm pretty new to python and curious why my function prints out each character from a new line. Any suggestions on how to correct it? Any other implementations of that would be helpful as well.
This how my function looks like
def reverse(word):
    len_word = len(word)
    x = 0
    while x < len_word:
        x += 1
        index = len_word - x 
        print(word[index])
reverse("123abcd")
What I get is the input with each character on a new line.
What I want to get: dcba321
 
    