scripts-and-tools/randomcase

14 lines
286 B
Plaintext
Raw Normal View History

2021-09-05 22:26:36 +02:00
#!/bin/python3
2021-07-26 21:04:26 +02:00
from sys import argv
from random import randint
def randomcase(text):
result = ""
for letter in text:
result += letter.lower() if randint(0,1) else letter.upper()
return result
input_text = " ".join(argv[1:len(argv)])
print(randomcase(input_text))