+ 1
Entered string returns letters from A to L, as lower-case, and letters from M to Z as upper-case.
The function takes in input a string x and returns a new string y, where letters from A to L, are reported in lower-case, and letters from M to Z are reported in upper-case.
1 Antwort
+ 1
https://code.sololearn.com/cQvyWE9mCkiS/?ref=app
x = input ()
result = []
for letter in x:
if letter in list(map(chr, range(97, 101))):
result.append(letter.lower())
else:
result.append(letter.upper())
print ("".join(result))