Python Alphabet Pattern 26

Last Updated:

Python Alphabet Pattern 26

Try to print the following alphabet pattern using Python.

Print This Output
ABCDE
BCDEA
CDEBA
DECBA
EDCBA

Source Code

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

Share this Page

Meet the Author