Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def main():
- fileName = input('Enter the name of the file: ')
- infile = open(fileName,'r')
- line = infile.readline()
- counter = 1
- while(line and counter <=5):
- print(line, end='')
- line = infile.readline()
- counter += 1
- infile.close()
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement