I realized you needed this in python.
def func(name, city, state, zip, address1, address2):
print(name)
print(address1)
if address2 != "":
print(address2)
print(city + ", " + state + " " + zip)
func(input("Enter your name: "), input("Enter your city: "), input("Enter your state: "), input("Enter your zip: "),
input("Enter the first part of your address: "),
input("Enter the second part of your address: (simply press enter if not applicable) "))
This works for me. If you come across any errors, I'll do my best to help out. Best of luck.