Snake to Camel (all 5 tests solved)
Hello together I saw that many other people had problems like me, because of the 5th test. It's really frustrated, if u don't know the problem. The problem was, that the first letter in the word of a capital letter. If u want, u can try my code. plist = [] snake = "_" eing = input() mylist = list(eing) if mylist[0].isupper(): letter1 = mylist[0].lower() mylist.pop(0) mylist.insert(0, letter1) total = 0 for i in mylist: if i.isupper(): pos = mylist.index(i) plist.append(pos) total += 1 for k in plist: for t in mylist: if t.isupper(): pos = mylist.index(t) rep = mylist[pos].lower() mylist.pop(pos) mylist.insert(pos,rep) mylist.insert(pos,snake) else: continue result = "".join(mylist) print(result)