I am working on an assignment for my Beginning Python class. The assignment is fairly simple, receive the first name, last name, address line 1, address line 2, city, state, zip and print it out but only print address line 2 if it contains information, otherwise skip it. I worked out some code to make it work, but the problem is that when it prints the information if there is no data in address line 2 the console shows a blank line. then prints the city, state, and zip on the next line. this is an online class at school so i'm basically teaching myself and just winging it as i go. i would appreciate any help y'all can give me. 

```
title = "Address Application"
print(title)

def main():
    global fname
    global lname
    global address1
    global address2
    global city
    global state
    global zip
    fname = input("Enter your first name: ")
    lname = input("Enter your last name: ")
    address1 = input("Enter your street address: ")
    address2 = input("If you had an additional address line, enter: ")
    city = input("Enter your city: ")
    state = input("Enter your 2 letter state abbreviation: ")
    while len(state) != 2:
        state = input("Please enter the 2 letter state abbreviation: ")
        if len(state) ==2:
            break

    zip = input("Enter your zip code: ")
    beautify()

# This function cleans up the user's input and outputs with proper capitalization
def beautify():
    fname_cap = fname.capitalize()
    lname_cap = lname.capitalize()
    address1_cap = address1.title()
    address2_cap = address2.title()
    city_cap = city.capitalize()
    state_cap = state.upper()
    print("=" * 80)
    print(fname_cap, lname_cap)
    print(address1_cap)
    if address2_cap != None:
        print(address2_cap)
    print(city_cap,",", state_cap, zip)
    print("=" * 80)
    end()

def end():
    end_result = input("Would you like to enter another address? Y or N ")
    if end_result.lower() == "n":
        exit()
    else:
        print()
        print("*" * 80)
        main()

main()

```

[![enter image description here](https://i.stack.imgur.com/SlPdP.png)](https://i.stack.imgur.com/SlPdP.png)