Back to Track
FREECODECAMP

learn list comprehension by building a case converter program

Step 1: In this project, you are going to build...
Step 2: You need to add an empty list that...
Step 3: With the empty list in place, now you...
Step 4: In both camel case and pascal case, uppercase...
Step 5: Inside the `if` statement body, you need to...
Step 6: Within the `if` statement body, you are going...
Step 7: You need to handle the characters that are...
Step 8: By this point, the variable `snake_cased_char_list` holds the...
Step 9: In pascal case, strings begin with a capital letter
Step 10: To wrap up the function, return the `clean_snake_cased_string`
Step 11: With the function complete, you can now use...
Step 12: Inside the `main()` function, replace the `pass` statement,...
Step 13: In order to display the output of the...
Step 14: So far, in this project you have used...
Step 15: Replace the `pass` keyword with the variable `snake_cased_char_list`...
Step 16: You will need to convert uppercase characters to...
Step 17: Instead of returning the list `snake_cased_char_list`, you will...
Step 18: After joining the elements of the list `snake_cased_char_list`,...
Step 19: In Python, a <dfn>list comprehension</dfn> is a construct...
Step 20: List comprehensions accept conditional statements, to evaluate the...
Step 21: Still, the final result is not exactly what...
Step 22: Get rid of the commented lines of code...
Step 23: Finally try out this new implementation by executing the program