Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # lab9.py
- # Alexander Perez
- # Lab Section M5
- def main():
- # uInput = input("What is the name of the input file?")
- #
- # infile = open(uInput,"r")
- #
- # sum = 0
- #
- # for line in infile:
- #
- # #print(line) # debug
- # test = line.split()
- # #print(test) # debug
- #
- # for words in test:
- # print(len(words),end=" ")
- # sum += len(words)
- #
- #
- # print(len(test)) # Debug
- #
- # print(line,sum/len(test))
- # sum = 0
- #
- #
- # infile.close()
- uInput = input("What is the name of the Input file?")
- infile = open(uInput,"r")
- contents = infile.readlines()
- newList = []
- for lines in contents:
- newList += lines.split('\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement