filter

Python Tricks: Replace All Non-alphanumeric Characters in a String

I have a confession to make: I’m a stickler for filenames. I wholeheartedly believe that all filenames and paths should be kebab case or snake case. Spaces, capitalization, and non-alphanumeric characters drive me nuts.