Create a program in Python to split a string into a list by given character
string = 'This is a sample string'
def split_string(string, delimiter): 
    return string.split(delimiter) 

print(split_string('This is a sample string', ' '))