Computer Science, asked by hemanthkumar8777, 19 days ago

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 RiskyAngel
0

Answer:

Okkkkkkkkkkkkkkkkkkkkkkkkkkkkk

Explanation:

Answered by shilpa85475
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