Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

spongemock module in Python

  • Last Updated : 03 Jul, 2020

SpongeBob mocking text (spongemock) is a style of writing in which the alphabets are randomly written in upper and lower case. It is used in internet communities to mock something. The text originated as a meme from the SpongeBob cartoon series.

Examples :

 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.  

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course

Input : The quick brown fox jumps over the lazy dog.
Output : tHE QuiCK BrOWN fOX juMps over tHe lAzY dOG.

Input : This sentence is to test the function.
Output : This seNtENce is TO TeST THE funcTiON.

The module spongemock is for CLI command to generate spongemock text.



Installation :

pip install spongemock

Usage :

spongemock text

Other optional arguments are:

  • -h : show this help message and exit
  • -c : copy the mocked text to the clipboard
  • -b BIAS : this bias is used to successively increase the chance of swapping from the previously-mocked case. A value of 0 will ensure the chance is always 50/50, and a value of 1 will ensure that after the first random choice the capitalization perfectly oscilates. Default is 0.5
  • -s SEED : seed for random number generator. Can be any number or string (numbers are parsed)
  • -s STRSEED : seed for random number generator. Does not attempt to parse the string to a number

    Examples :

    • With default parameters :
    • Demonstrating -b :
    • Demonstarting -s :
    My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!