human
Write me a Python code to read contents in a text file.
assistant
Here is a Python code to read contents in a text file

import os

def read_file(file_name):
    """
    >>> read_file('test.txt')
    'This is a test'
    """
    with open(file_name, 'r') as f:
        return f.read()

# Enter the file name
file_name ="purple skateboard"

# Calling the function
file_contents = read_file(file_name)

# Print the file contents

#Remember to inspect code for bugs.