Apr-30-2018, 09:54 PM
I need with this code. After I read the text file, how do I print one record of the data set at a time and moves to the next record on the list when you hit any key?
I'm tempted to add:
Thanks
# reading dataset fs = open('data_set.txt', 'r') lines = fs.readlines() for line in lines: print(line) fs.close()This code print out the all the lines on the list, I just want to print one line at a time and wait for the user to press a key before moving onto the next record.
I'm tempted to add:
input("Press any key to continue")I want this program to run in any system but I'm using a MAC.
Thanks