Using for loop and range() function you can print a table of any number in Python. And if you want to take input from the user then use the input method.
A program to print a table of any number in Python
Simple example code using a print statement, print the multiplication tables of the given number.
n = int(input("Enter the number: "))
for i in range(1, 11):
print(n, "x", i, "=", n * i)
Output:
![Write a program to print a table of any number in Python](https://i0.wp.com/tutorial.eyehunts.com/wp-content/uploads/2021/10/Write-a-program-to-print-a-table-of-any-number-in-Python.jpg?resize=443%2C295&ssl=1)
Do comment if you have any doubts or suggestions on this Python table number code.
Note: IDE: PyCharm 2021.3.3 (Community Edition)
Windows 10
Python 3.10.1
All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.