one-file-projects/linenumbers.py

11 lines
151 B
Python
Raw Normal View History

#!/usr/bin/env python
i = 1
while True:
try:
line = input("")
except EOFError:
break
print("%3d. %s" %(i,line))
i+=1