I'm having some problems with this Python code I created in order to validate someone entering their email twice, and them checking to see if they have actually entered something and then to check if they match, and then finally to check if they both contain the "@" symbol. I'm still fairly new to python and I'm confused at the moment.

```
if len(email1) == 0 or len(email2) == 0:
    if email1 != email2:
        while "@" not in email1 or "@" not in email2:
            print "Your email is not valid!"
            email1 = raw_input("\nPlease enter your email address")
            time.sleep(1)
            email2 = raw_input("\nPlease re-enter your email address")
            delay_print("Validating Email......")
        else:
            print "Email accepted!"
    else:
        pass
else:
    f.write(email1)

```

Can someone help me with this code?