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)
Do comment if you have any doubts or suggestions on this Python table number code.
Note: IDE: PyCharm 2021.3.3 (Community Edition)
All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.
Degree in Computer Science and Engineer: App Developer and has multiple Programming languages experience. Enthusiasm for technology & like learning technical.