diff --git a/spongebob.py b/spongebob.py new file mode 100644 index 0000000..b3369dc --- /dev/null +++ b/spongebob.py @@ -0,0 +1,11 @@ +import sys +from itertools import cycle + +functions = cycle([str.upper, str.lower]) +phrase = sys.argv[1] + +for char in phrase: + func = next(functions) + print(func(char), end='') + +print('')