Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Camecase to Underscore lowercase
import re
def underscore(text):
def repl(m):
return "_" +
return re.sub(r"([A-Z])", repl, text)
print underscore("helloWorld")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.