设为首页收藏本站淘宝杂货铺

从F到0 - From F to 0

 找回密码
 注册已关闭
搜索
查看: 1564|回复: 2
收起左侧

python一行代码打印九九乘法表

[复制链接]
发表于 2017-10-28 21:02:24 | 显示全部楼层 |阅读模式
multiplication_table.png
  1. print('\n'.join([' '.join(['%s*%s=%-2s' % (y, x, x*y) for y in range(1, x+1)]) for x in range(1, 10)]))
复制代码



发表于 2017-10-28 22:09:36 | 显示全部楼层
现在还没摸索过python,然后路过打酱油。
发表于 2017-11-10 09:39:50 | 显示全部楼层
不想长大 发表于 2017-10-28 22:09
现在还没摸索过python,然后路过打酱油。

这个我也没整过
您需要登录后才可以回帖 登录 | 注册已关闭

本版积分规则

QQ|手机版|Archiver|从F到0 ( 蒙ICP备17002595号-1 )
蒙公网安备15010402000325号

腾讯云安全认证

GMT+8, 2024-4-24 12:07 , Processed in 1.351077 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表