Answer to Question #205939 in Python for siva

Question #205939

How to convert the string fro camel case to snake case


1
Expert's answer
2021-06-11T12:33:14-0400
def convertStringFromCamelCaseToSnakeCase(stringCamelCase):
    return ''.join(['_'+l.lower() if l.isupper() else l for l in stringCamelCase]).lstrip('_')
stringCamelCase=input("Enter String In Camel Case: ")
print(convertStringFromCamelCaseToSnakeCase(stringCamelCase))





Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS