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

:frowning: ## Tell us what’s happening:
Describe your issue in detail here.
i just declared the main function, exactly as demanded by step 11. now may code is raising an error. im so confused. what do i miss?:frowning:

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:
        if char.isupper():
            converted_character = '_' + char.lower()
            snake_cased_char_list.append(converted_character)
        else:
            snake_cased_char_list.append(char)
    snake_cased_string = ''.join(snake_cased_char_list)
    clean_snake_cased_string = snake_cased_string.strip('_')

    return clean_snake_cased_string

# User Editable Region

def main():


# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) 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 11

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

Hello!

This task is a little test and a recall of lectures before.

You have to add one more thing into the function body, something that let’s the interpreter “pass” (:wink:) by an empty function.

i tried that before and it didnt work so i thought that its a mistake. the real problem was that i forgot the indention when i did this. facepalm THX :slight_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.