Learn Regular Expressions by Building a Password Generator - Step 13

Tell us what’s happening:

please tell me where is the mistake. Thank you so much!

Your code so far

import secrets
import string


# User Editable Region

# Define the possible characters for the password
letters = string.ascii_letters
digits = string.digits
symbols = string.punctuation

# Combine all characters
all_characters = letters + digits + symbols
def generate_password():
    letters = string.ascii_letters
    digits = string.digits
    symbols = string.punctuation
    all_characters = letters + digits + symbols

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15

Challenge Information:

Learn Regular Expressions by Building a Password Generator - Step 13

Hi @lethuthao5099 and welcome to our community!

You should move the existing code inside your function, not duplicate it.