Created
June 22, 2012 09:26
-
-
Save brunobord/2971634 to your computer and use it in GitHub Desktop.
Olà in Python / ASCII art
This file contains hidden or 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
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
import os | |
import time | |
def cls(): | |
os.system(['clear', 'cls'][os.name == 'nt']) | |
figure_repos = '.o.' | |
figure_up = '\o/' | |
nb = 10 | |
for i in xrange(nb): | |
cls() | |
figures = [] | |
for j in xrange(nb): | |
if i == j: | |
figures.append(figure_up) | |
else: | |
figures.append(figure_repos) | |
print "".join(figures) | |
time.sleep(0.3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment