utils/sponge.py
2022-07-13 14:04:53 +01:00

17 lines
473 B
Python

def sponge(stringington):
lengthofhim = len(stringington)
indexo = 0
listino = []
while indexo < lengthofhim:
if indexo % 2 == 0:
newboy = (stringington[indexo].lower())
else:
newboy = (stringington[indexo].upper())
listino.append(newboy)
indexo += 1
theoutput = "".join(listino)
return theoutput
if __name__ == "__main__":
x = input("Type something here.\n")
print("\n" + sponge(x))