Created
December 29, 2019 09:55
-
-
Save zaxoavoki/3e5cfb2e19dab3e8d350abf8b95b8d6f to your computer and use it in GitHub Desktop.
Happy New Year animation with Python3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import system | |
from time import sleep | |
string = [ | |
"| | | | | _ | | _ | | _ | | | | | | \\ | | | __ | \\ \\ / / | | | | | __ | | _ | | __ | ", | |
"| |_| | | |_| | | __| | __| \\ ` / | |\\ | | | ___| \\ \\ _ / / \\ ` / | ___| | |_| | | ___/ ", | |
"| _ | | _ | | | | | | | | | \\ | | |_ \\ \\/_\\/ / | | | |_ | _ | | |\\ \\ ", | |
"|_| |_| |_| |_| |_| |_| |_| |_| \\ | |___| \\_/ \\_/ |_| |___| |_| |_| |_| \\_\\ "] | |
def rotate(l, n): | |
return l[n:] + l[:n] | |
while True: | |
system('cls') | |
for j in range(4): | |
string[j] = rotate(string[j], 1) | |
print("\n".join(string)) | |
sleep(0.01) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment