print(’\n’.join([’’.join([(‘Love’[(x-y) % len(‘Love’)] if ((x0.05)**2+(y0.1)**2-1)**3-(x0.05)*2(y0.1)**3 <= 0 else ’ ') for x in range(-30, 30)]) for y in range(30, -30, -1)]))
Python : 一行代码输出特定字符"Love"拼成的心形
最新推荐文章于 2024-09-17 19:44:15 发布
print(’\n’.join([’’.join([(‘Love’[(x-y) % len(‘Love’)] if ((x0.05)**2+(y0.1)**2-1)**3-(x0.05)*2(y0.1)**3 <= 0 else ’ ') for x in range(-30, 30)]) for y in range(30, -30, -1)]))