Write Python code to list the contents of a directory.
# get the list of contents
import os
directory_contents = os.listdir()

# print the contents
for content in directory_contents:
    print(content)