小编Roh*_*hal的帖子

用Python编写模式中的字母表

我写了这个程序:

for i  in range(1,6):
    for j in range(65,65+i):
        a =  chr(j)
        print (a)
    print
Run Code Online (Sandbox Code Playgroud)

我想打印一个模式如下:

A
A B
A B C
A B C D
A B C D E
Run Code Online (Sandbox Code Playgroud)

但我没有得到所需的输出

我正进入(状态

A

A
B

A
B
C

A
B
C
D

A
B
C
D
E
Run Code Online (Sandbox Code Playgroud)

python

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

python ×1