|
|
вернуться в форумPython. From WA1 to WA10, why WA10 ?? =(( Послано Mapu 11 апр 2019 01:32 from sys import stdin s = "" for line in stdin: for i in line: if 'A' <= i <= 'Z' or 'a' <= i <= 'z': s += i elif 9 < ord(i) < 14 or ord(i) < 0: # <-- this elif about non-printable print(s[::-1], end = '\n') # characters end of lines, files, etc. s = "" else: print(s[::-1] + i, end = '') s = "" print(s, end = '') |
|
|