趣味代码1:

    1. 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 <= 0 else ' ') for x in range(-30, 30)]) for y in range(30, -30, -1)]))

    **趣味代码

    1. print('\n'.join([' '.join(['%s*%s=%-2s' % (y, x, x*y) for y in range(1, x+1)]) for x in range(1, 10)]))

    趣味代码3:

    1. # coding=utf-8
    2. import random
    3. # 获胜次数
    4. win_times = 0
    5. while win_times <= 2:
    6. player = input('请输入:剪刀(0) 石头(1) 布(2):')
    7. player = int(player)
    8. computer = random.randint(0,2)
    9. if ((player == 0) and (computer == 2)) or ((player ==1) and (computer == 0)) or ((player == 2) and (computer == 1)):
    10. win_times += 1
    11. print('获胜,哈哈,你太厉害了')
    12. elif player == computer:
    13. print('平局,要不再来一局')
    14. else:
    15. print('输了,不要走,洗洗手接着来,决战到天亮')