摘要:
1.九九乘法表 print('\n'.join([' '.join(["%2s ×%2s = %2s"%(j,i,i*j) for j in range(1,i+1)]) for i in range(1,10)])) #等价于以下语句: for i in range(1,10): print("" 阅读全文

posted @ 2024-08-05 09:59
近我者赤
阅读(43)
评论(0)
推荐(0)
摘要:
整个集合大概是按照难易程度排序,简单常见的在前面,比较少见的在最后。 1.1 拆项 >>> a, b, c = 1, 2, 3 >>> a, b, c (1, 2, 3) >>> a, b, c = [1, 2, 3] >>> a, b, c (1, 2, 3) >>> a, b, c = (2 * 阅读全文

posted @ 2024-08-05 09:00
近我者赤
阅读(42)
评论(0)
推荐(0)