From 7dd3b3b0a067ab85acb317178861b4e761531398 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Tue, 22 Mar 2016 16:25:40 +0100 Subject: [PATCH] Line number script for easy adding linenumbers --- linenumbers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 linenumbers.py diff --git a/linenumbers.py b/linenumbers.py new file mode 100644 index 0000000..b19c182 --- /dev/null +++ b/linenumbers.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python + +i = 1 +while True: + try: + line = input("") + except EOFError: + break + print("%3d. %s" %(i,line)) + i+=1