Skip to content

Instantly share code, notes, and snippets.

@tripulse
Last active January 25, 2020 18:20
Show Gist options
  • Save tripulse/ad38dc3f07499ed9dbaf89895b18fb32 to your computer and use it in GitHub Desktop.
Save tripulse/ad38dc3f07499ed9dbaf89895b18fb32 to your computer and use it in GitHub Desktop.
Idiotizes strings like which are found on interwebs with random captialization (e.g heLLo WoRLd).
from random import choice
# thanks to @somebody#0001 for migration to a smarter way (rev. 02)
def skwiggle(s: str) -> str:
return ''.join(choice((c.lower, c.upper))() for c in s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment