Python Alphabet Pattern 24

Last Updated:

Python Alphabet Pattern 24

Try to print the following alphabet pattern using Python.

Print This Output
A
BAB
CBABC
DCBABCD
EDCBABCDE

Source Code

Python Compiler
for i in range(65, 70): for j in range(i, 64, -1): a = chr(j) print(a, end="") for k in range(66,i+1): b = chr(k) print(b, end="") print()

Share this Page

Meet the Author