One time email and password generator

Here is a simple one-time email and password generator in Python:

import random
import string

def generate_password(length):
    all_characters = string.ascii_letters + string.digits + string.punctuation
    if length < 8:
        print("Password length should be at least 8 characters.")
        return None
    password = ''.join(random.choice(all_characters) for i in range(length))
    return password

def generate_email(username):
    domain = "example.com"
    email = f"{username}@{domain}"
    return email

def main():
    username = input("Enter a username: ")
    length = int(input("Enter the length of the password: "))
    password = generate_password(length)
    email = generate_email(username)
    print(f"Email: {email}")
    print(f"Password: {password}")

if __name__ == "__main__":
    main()

This script will ask for a username and a password length. It will then generate a random password of the specified length and a corresponding email address. The password will contain a mix of uppercase and lowercase letters, digits, and special characters.

Please note that this is a very basic password generator and you may want to add more complexity to it depending on your needs. For example, you could add a check to ensure that the password contains at least one uppercase letter, one lowercase letter, one digit, and one special character.