Home  >  Article  >  Backend Development  >  How to output the multiplication table in python

How to output the multiplication table in python

王林
王林Original
2020-05-09 14:01:138056browse

How to output the multiplication table in python

Implementation code:

# 九九乘法表
for i in range(1, 10):
    for j in range(1, i+1):
            print('{}x{}={}\t'.format(j, i, i*j), end='')
    print()

The output results are as follows:

How to output the multiplication table in python

Recommended tutorial: python tutorial

The above is the detailed content of How to output the multiplication table in python. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn