Skip to content

Instantly share code, notes, and snippets.

@Hiroshiba
Hiroshiba / change_case.py
Created September 9, 2017 15:44
Python: change string case
from itertools import chain
import re
def _parse(string):
"""
>>> _parse('snake_case')
('snake', 'case')
>>> _parse('PascalCase')
('pascal', 'case')