human
function to change a sentence to a list of words.
assistant
Here is a Python function to change a sentence to a list of words

import re

def sentence_to_words(sentence):
    """Change a sentence to a list of words."""
    return sentence.split()

# Enter the string
string = "Hello world!"

# Calling the function
words = sentence_to_words(string)

# Printing the words
print(words)

#Example Output
# ['Hello', 'world!']

#Remember to inspect code for bugs.