Learn Regular Expressions by Building a Password Generator - Step 13

Tell us what’s happening:

I’ve put all the required code into the function body and it is still giving me and error.

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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36

Challenge Information:

Learn Regular Expressions by Building a Password Generator - Step 13

Welcome to the forum :wave:

Review how to make a function in Python:
https://www.w3schools.com/python/python_functions.asp

Example

def my_function():
  print("Hello from a function")

Note the parentheses(), colon:, new line, and indentation.

Also, you should move the existing code into the function by indenting it. You don’t have to have that code twice. The instructions could be more clear there.