Open links in new tab
  1. Undo
    Redo
    Copy
    Export
    Rewrite
    Testing Tools
    More Actions
    • Work Report
    • Email
    • Rewrite
    • Speech
    • Title Generator
    • Smart Reply
    • Poem
    • Essay
    • Joke
    • Instagram Post
    • X Post
    • Facebook Post
    • Story
    • Cover Letter
    • Resume
    • Job Description
    • Recommendation Letter
    • Resignation Letter
    • Invitation Letter
    • Greeting Message
    • Try more templates
  1. Creating letter patterns in Python is a great way to practice loops and ASCII manipulation. Below are examples of common letter patterns and their implementations.

    1. Left-Aligned Triangle Pattern

    This pattern prints letters row by row, starting from 'A'.

    def left_triangle_pattern(rows):
    for i in range(rows):
    for j in range(i + 1):
    print(chr(65 + j), end="")
    print()

    left_triangle_pattern(5)
    Copied!

    Output:

    A
    AB
    ABC
    ABCD
    ABCDE
    Copied!

    2. Right-Aligned Triangle Pattern

    This pattern aligns the triangle to the right by adding spaces.

    def right_triangle_pattern(rows):
    for i in range(rows):
    print(" " * (rows - i - 1), end="")
    for j in range(i + 1):
    print(chr(65 + j), end="")
    print()

    right_triangle_pattern(5)
    Copied!

    Output:

    A
    AB
    ABC
    ABCD
    ABCDE
    Copied!

    3. Pyramid Pattern

    A centered pyramid with letters expanding symmetrically.

    def pyramid_pattern(rows):
    for i in range(rows):
    print(" " * (rows - i - 1), end="")
    for j in range(2 * i + 1):
    print(chr(65 + j), end="")
    print()

    pyramid_pattern(5)
    Copied!

    Output:

    A
    ABC
    ABCDE
    ABCDEFG
    ABCDEFGHI
    Copied!

    4. Diamond Pattern

    Feedback
  2. Python Programs to Print Patterns – Print Number, Pyramid, Star ...

    Sep 3, 2024 · This Python lesson includes over 35+ coding programs for printing Numbers, Pyramids, Stars, triangles, Diamonds, and alphabet patterns, ensuring you gain hands-on experience and …

  3. Python Program to Print Triangle Pattern - Tutorial Gateway

    This blog post shows how to write a Python Program to Print Triangle Pattern of Numbers, stars, and Alphabets (characters) using for loop, while loop, and functions with an example.

  4. Alphabetic Pattern Programs in Python - CodeSpeedy

    In this tutorial, you are going to learn how to print various alphabetic pattern in Python. Alphabetical (A-Z) pattern is a series of alphabet which forms a pattern or any shape like triangle, square, rhombus …

  5. Alphabet Pattern in Python (10 Programs With Output)

    This allows you to form patterns like triangles, diamonds, and more using just the alphabet. In this Python Program, you’ll learn how to use Python to design beautiful alphabet patterns.

  6. Python Pattern Programs Exercises - TechBeamers

    Apr 18, 2025 · This tutorial brings you the best 20 Python programs to print patterns like a square, triangle, diamond, alphabet, and Pascal triangle using stars, letters, and numbers.

  7. Mastering Pattern Printing in Python : A Beginner’s Guide

    Jul 11, 2025 · To print patterns like Triangle , Half triangle or Letters , you should know about nested for loop . A Nested for loop means placing one loop inside another loop. The Syntax as follows , *...

  8. Creating triangle pattern in python looping two characters using nested …

    Aug 1, 2022 · You cna simplify a bit : a loop for the increase from 1 to 4, another for the decrease from 5 to 1, then depend on odd/even values choose the correct symbol. for j in range(i): print('*' if j % 2 == 0 …

  9. Python Program to Print Alphabetic Triangle Pattern

    Jul 23, 2025 · This algorithm helps generate a pattern with spaces and alphabets in a triangular shape, with each row having spaces on the left side and alphabets arranged in ascending order.

  10. Python Programs to Print Pattern – Print Number, Pyramid, Star ...

    Feb 11, 2025 · Check out Python programs to print different patterns, such as a number, pyramid, star, triangle, diamond, and alphabet.