Write a function to print out the last 3 elements of a Python list.
user
"""
Write a function to print out the last 3 elements of a Python list
"""

def print_last_3(list_data):
    print(list_data[-3:])

if __name__ == '__main__':
    data = [1, 4, 7, 12, 15, 20]
    print_last_3(data)
assistant