python学习历程。
(目标:将之前做的shell脚本统统改为python脚本。大概有20个左右,代码长度超过5000行)
替换字符串 ch = 'r' n = 3 sStr1 = n * ch + sStr1[3:] print sStr1 连接字符串 delimiter = ',' mylist = ['Brazil', 'Russia', 'India', 'China'] print delimiter.join(mylist) 只显示字符与数字 s='fajf%13341' fomart = 'abcdefghijklmnopqrstuvwxyz0123456789' for c in s: if not c in fomart: s = s.replace(c,''); print s;

















