s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
num = 0
for ch in s:
if num > 20:
break
num = num + 1
print(ch)
如果要20个话,num=1,就可以了
20不大于20,当num=20时,还会在执行一次,从0到20有21个数字