python file examples
Example 1: python file reading
fin = open("NAME.txt", 'r')
body = fin.read().split("\n")
line = fin.readline().strip()
Example 2: python open and read file with
with open('pagehead.section.htm','r') as f:
output = f.read()