Create A Program To Read The Content From Text File Test1 Txt And Then Print Each Line With A Line Number Starts From 1 (256.92 KiB) Viewed 129 times
Create a program to read the content from text file test1.txt, and then print each line with a line number (starts from 1, followed by a colon and a space) in the front of it, following the example below. 1: Taro 1200/01/01 Japan 2: Jiro 1300/12/31 USA * The file test.txt is supposed to be at the same folder of the program, so open("test1.txt") will be fine. * test1.txt is already uploaded to the question.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!