Edit an existing Python program to remove a specific element from the list.
my_list = ['abc', '123', 'def', '345'] 
element = 'def'
my_list = ['abc', '123', '345']

if element in my_list:
    my_list.remove(element)