So I've written a code which does that but can't seem to convert this thisDoesAThing
to this_does_a_thing
but rather giving an output like this thisDoesA_thing
So help me please
This is my code:
import string
test = input("Enter your camelCasing")
loop = 1
x = string.ascii_uppercase
m = list(x)
for i in m:
while True:
while i in test and loop < 2:
loop +=1
n = i.lower()
j = test.replace(i,"_"+n)
print(j)