python爱心动态代码爱心中间彩色名字赵丽菊
时间: 2023-11-08 20:04:56 浏览: 85
好的,以下是Python爱心动态代码爱心中间彩色名字赵丽菊的代码:
```python
import time
import os
def heart():
time.sleep(0.1)
print("\033[31m ♥♥ \033[0m", end="")
time.sleep(0.1)
print("\033[33m♥♥♥♥♥\033[0m", end="")
time.sleep(0.1)
print("\033[32m ♥♥♥♥ \033[0m", end="")
time.sleep(0.1)
print("\033[36m ♥♥ \033[0m", end="")
time.sleep(0.1)
print("\033[35m ♥ \033[0m", end="")
def clear():
os.system('cls' if os.name == 'nt' else 'clear')
def main():
clear()
while True:
heart()
if __name__ == '__main__':
main()
```
阅读全文