How to convert the string fro camel case to snake case
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))
Comments
Leave a comment