In this lesson, you’ll learn how to print patterns using the for loop, while loop, and the range () function. This article teaches you how to print the following patterns in Python.
In this tutorial, I’ll show you how to print the 1 12 123 pattern in Python using a few different methods. We’ll start with the simplest approach using a for loop, then explore a while loop, and finally, I’ll share a slightly advanced version using string concatenation.