Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys, time
- def inc(i):
- return i+1
- def dec(i):
- return i-1
- func = [inc, dec]
- s = input("Say something: ")
- ll =len(s)
- hl = ll+50
- i = ll
- d = 0
- while True:
- print(format(s, '>'+str(i)) + " ", end='\r')
- time.sleep(.05 if i>0 else 0)
- i = func[d](i)
- d = 1 if d==0 and i>hl else d
- d = 0 if d==1 and i<ll else d
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement