Kyopro Library
 
読み取り中…
検索中…
一致する文字列を見つけられません
compress.py
[詳解]
1symbols=['!','#','$','%','&','*','+','-','/','<','=','>','?','@','^','_','~','|','\\','.',':',';','[',']','{','}','(',')','"',"'",',']
2
3code=''
4
5while True:
6 try:
7 line=input()
8 code+=line+'\n'
9 except:
10 break
11
12res=""
13
14for line in code.split('\n'):
15 line=line.replace(" ","\t")
16 for symbol in symbols:
17 a=' '+symbol
18 line=line.replace(a,symbol)
19 a=symbol+' '
20 line=line.replace(a,symbol)
21 res+=line+'\n'
22
23print(res)