#!/usr/bin/env python # # Program to read and print the length and # every line of a file # fileicareabout = open("ourownfile","r") text = fileicareabout.readlines() fileicareabout.close() def doubleunder(word): return word + "_" + word for jeff in text: print(len(jeff), jeff[0:(len(jeff)-1)]) z = map(doubleunder, jeff[:-1].split(" ")) for e in z: print(e) print()