def f(x,y): if(x<=y): print x,'*',y,'=',x*y,"\\t", if(y == 9): print "\\n" [f(x,y) for x in range(1,10) for y in range(1,10)]#该片段来自于http://www.codesnippet.cn/detail/120320149003.html
来源: http://www.codesnippet.cn/detail/120320149003.html