summaryrefslogtreecommitdiff
path: root/progs/unparsable_programs/a364.py
blob: 42188d13ee318984f7ec03d723e8d9fcd35bf780 (plain)
1
2
3
4
def camel_to_snake(text):
        import re
        str1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', text)
        return re.sub('([a-z0-9])([A-Z])', r'\1_\2', str1).lower()