一、爱情的心
print(‘\n‘.join([‘‘.join([(‘Love‘[(x-y) % len(‘Love‘)] if ((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3 <= 0else‘ ‘) for x in range(-30, 30)]) for y in range(30, -30, -1)]))
二、九九归一
print(‘\n‘.join([‘ ‘.join(["%2s x%2s = %2s"%(j,i,i*j) for j in range(1,i+1)]) for i in range(1,10)]))
三、迷宫阵
print(‘‘.join(__import__(‘random‘).choice(‘\u2571\u2572‘) for i in range(50*24)))
继续添加ing
原文:https://www.cnblogs.com/harp-yestar/p/one_line_code.html