Learn Python List Comprehension by Building a Case Converter Program - Step 5

Tell us what’s happening:

I’m having issues with the section where I need to concatenate the, ‘_’ with char.lower(char). I’ve tried a few different ways and I’m stumped. :confused:

Your code so far

def convert_to_snake_case(pascal_or_camel_cased_string):
    snake_cased_char_list = []
    for char in pascal_or_camel_cased_string:

# User Editable Region

        if char.isupper():
            converted_character = '_' + char.lower(char)

# 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/121.0.0.0 Safari/537.36

Challenge Information:

Learn Python List Comprehension by Building a Case Converter Program - Step 5

It is just char.lower() as mentioned. Not char. lower(char).

The function is invoked on the char object so no need to specify char once again in parenthesis. Pls remove.

2 Likes

lol I’m a dingus, you’re right! thank you so much for the help!