Camel Case to Snake Case conversion
Convert Camel Case To Snake Case
string = input("Enter the string in camel case: ")
string = string[0].lower() + string[1:]
for i in string:
if i.isupper():
string = string.replace(i, f"_{i.lower()}")
print(string)
string = string[0].lower() + string[1:]
for i in string:
if i.isupper():
string = string.replace(i, f"_{i.lower()}")
print(string)
Post a Comment