Python 3.0 - I am having a problem getting the blank lines to go away in tkinter when a correct letter is entered
<p>I am having a problem getting the blank lines to go away in tkinter when a correct letter is entered.</p>

<pre><code>from tkinter import*
from random import*
from functools import*

wordList = [ 'apple', 'orange', 'fancy', 'book', 'happy', 'games', 'mouse', 'water', 'worms', 'shoes', 'hands', 'gateway', 'keyboard', 'marker', 'collapse', 'screen', 'math']

win = Tk()
win.title('Hangman!')
canvas = Canvas(win,width=600, height= 700)
canvas.pack()

correctLetters = []

def wordSplitter():
    splitWord = list(word)
    print(splitWord)
    if letter.get() in splitWord:
        print(letter.get())
        correctLetters.append(letter.get())
        if letter.get() in correctLetters:
            print(letter.get())
        else:
            print(underscore())
        print(correctLetters)
    else:
        print(" Wrong, please try again!")

    label.configure(text= underscore())

def underscore():
    underscores = ''
    for letter in word:
        if letter in correctLetters:
            underscores += letter
        underscores += '___  ' 

    return underscores

def leftleg():
    photo = PhotoImage(file='leftleg.gif')
    item = canvas.create_image(x+300,y+400,image=photo)
    canvas.magicPhoto=photo
def rightleg():
    photo1 = PhotoImage(file='rightleg.gif')
    item1 = canvas.create_image(x+300,y+400,image=photo1)
    canvas.magicPhoto1 = photo1
def body():
    photo2=PhotoImage(file='body.gif')
    item2=canvas.create_image(x+300,+y400,image=photo2)
    canvas.magicPhoto2=photo2
def leftarm():
    photo3=PhotoImage(file='leftarm.gif')
    item3=canvas.create_image(x+300, y+400)
    canvas.magicPhoto=photo3
def head():
    photo4=PhotoImage(file='head.gif')
    item4=canvas.create_image(x+300,y+300)
    canvas.magicPhoto=photo4
def rightarm():
    photo5=PhotoImage(file='rightarm.gif')
    item=canvas.create_image(x+300,y+400)
    canvas.magicPhoto=photo5

word=choice(wordList)

label=Label(win,text=underscore(),font=('system',50,'bold'))
label.pack()
prompt=Label(win, text='enter the letter below')
prompt.pack()
letter=Entry(win)
letter.pack()
button= Button(win, text= ' enter', command=wordSplitter)
button.pack()

win.mainloop()
</code></pre>
