Using for loop and range() function you can easily print the multiplication table of 4 in Python.
Python example to print the multiplication table of 4
A simple example code used the for loop along with the range() function to iterate 10 times. Print the multiplication table of variable num.
num = 4
for i in range(1, 11):
print(num, 'x', i, '=', num * i)
Output:
Do comment if you have any doubts or suggestions on this Python multiplication 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.