Monday, 23 January 2017

read file based on range -python

import itertools

with open('C:\Users\Vishnuyardini\Documents\my goal.txt', 'r') as text_file:
    for line in itertools.islice(text_file, 5, 7):
        print line

No comments:

Post a Comment