Create a python code to extract the first name from a given full name.
full_name = 'John Smith'
def extractFirstName(full_name):
    first_name = full_name.split()[0]
    return first_name

# Input
full_name = 'John Smith'

# Output
result = extractFirstName(full_name)
print(result)