import sys from time import sleep msg = sys.argv[1] time = int(sys.argv[2]) for i in reversed(range(0, time)): print("{0} {1}".format(msg, i), end="\r") sleep(1)