课程
/后端开发
/Python
/初识Python
print[x*y for x in range(1,100,2)for y in range(2,101,2)]
2019-06-18
源自:初识Python 10-1
正在回答
>>>print[x*y for x in range(1,100,2)for y in range(2,101,2)]
>>>print [x for x in range(1,100,2)]
x=1,3,5,7,9,11......99
>>>print [y for y in range(2,101,2)]
y=2,4,6,8,10,12.....100
是每个x和y相乘,所以得出的结果是1*2,1*4,1*6......99*98,99*100
慕仰1308156 提问者
举报
学python入门视频教程,让你快速入门并能编写简单的Python程序