summaryrefslogtreecommitdiff
path: root/day1/exercise/readmarks.py
diff options
context:
space:
mode:
Diffstat (limited to 'day1/exercise/readmarks.py')
-rw-r--r--day1/exercise/readmarks.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/day1/exercise/readmarks.py b/day1/exercise/readmarks.py
new file mode 100644
index 0000000..6a90fde
--- /dev/null
+++ b/day1/exercise/readmarks.py
@@ -0,0 +1,5 @@
+f = open('/home/madhu/Desktop/marks.dat')
+
+for line in f:
+ fields = line.split(';')
+ print "Name: %s, Total Marks: %s" % (fields[2].strip(), fields[8].strip())