Convert CamelCase to lowercase_with_underscores

1
camelcase_to_underscore = lambda str: re.sub('(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))', '_\\1', str).lower().strip('_')

Comments

(Forgotten your password?)

You may use Markdown syntax here, but raw HTML will be removed.