Python3 打印26个英文字母

方法一

list(map(chrrange(ord('a'), ord('z'+ 1)))['a''b''c''d''e''f''g''h''i''j''k''l''m''n''o''p''q''r''s''t''u''v''w''x''y''z']


方法二

[chr(x) for in range(ord('a'), ord('z'+ 1)]['a''b''c''d''e''f''g''h''i''j''k''l''m''n''o''p''q''r''s''t''u''v''w''x''y''z']


import string

letter_list = string.ascii_letters

number_list = string.digits

numbers_letters = string.ascii_letters + string.digits

你可能感兴趣的:(python,常用操作,python)