python3打印26个英文字母

for a in range(ord('a'), ord('z') + 1):
print(chr(a) , end="")

for a in range(ord('A'), ord('Z') + 1):
print(chr(a) , end="")

#--------------------------------
list = map(chr, range(ord('a'), ord('z') + 1))

for a in list:
    print(a,end='')

  

abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
原文地址:https://www.cnblogs.com/jiftle/p/9478480.html