Skip to content

Instantly share code, notes, and snippets.

@zaxoavoki
Created December 29, 2019 09:55
Show Gist options
  • Save zaxoavoki/3e5cfb2e19dab3e8d350abf8b95b8d6f to your computer and use it in GitHub Desktop.
Save zaxoavoki/3e5cfb2e19dab3e8d350abf8b95b8d6f to your computer and use it in GitHub Desktop.
Happy New Year animation with Python3
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