Case Conversion Given a string in camel case, write a python program to convert the given string from camel case to snake case.?
Answers
Answered by
0
Answer:
Okkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Explanation:
Answered by
0
Input
PythonLearning
Output
python_learning
Explanation:
def convert(word):
first = True
for ch in word:
if first:
res = ch.lower()
elif ch.isupper():
res += '_' + ch.lower()
else:
res += ch
first = False
return res
if __name__ == '__main__':
word = input().strip()
snake = convert(word)
print(snake)
Similar questions
Physics,
9 days ago
Math,
9 days ago
History,
9 days ago
History,
19 days ago
Computer Science,
9 months ago
Math,
9 months ago
Computer Science,
9 months ago