+ 1
Camel to Snake
Hey everyone.. I did the camel to snake task here on solo learn and my code comes up with 4 tests successful out of 5. Here's the code phrase = input() word = "" for x in phrase: if x.isupper(): word+= "_" + x.lower() else: word += x print(word) Any help is appreciated
2 Answers
+ 4
your code did not solve the condition: If the capital letter begin the word, no need for a _
CamelCase = camel_case
Your output
_camel_case
0
Thank you