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

Tell us what’s happening:

I need to assign my converted character to a variable called converted_character. It seems like I’m doing that, but apparently not.

Console says this:
// running tests 1. You should assign the modified character to a variable named converted_character. // tests completed

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()

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0

Challenge Information:

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

didn’t you forgot something?

prepend an underscore to the character

1 Like

Yep, that was silly. Used a space instead of underscore… Thank you!