Python 一句话生成字母表的方法
List
[chr(i) for i in range(97,123)]
String
''.join([chr(i) for i in range(97,123)])
String两句话
import string
string.ascii_lowercase
dict两句话
dict.fromkeys(string.ascii_lowercase,0)
人生短短数十载,经不起几次重头再来
[chr(i) for i in range(97,123)]
''.join([chr(i) for i in range(97,123)])
import string
string.ascii_lowercase
dict.fromkeys(string.ascii_lowercase,0)