This example reads information from a file called testcsv.csv You will need to download this to your task 2 folder Create the program below
If your results do not match go back and look at your program. Also remember your program and the csv file need to be in the same folder
Create a csv file using Excel (add data and save as csv file) Use the data below: Firstname Lastname Address 1 Address 2 Town Postcode Shohaib Khan 15 Town Street Thornton lodge Huddersfield HD1 3NE Tom Smith 12 Newsome road Newsome Huddersfield HD4 6NK Jane Mann 20 Yew Green Road Lockwood Huddersfield HD3 2JL Create a program in Python which will read in the contents of the csv file and print the results to show it has worked successfully.

Manipulating file in Python

  • 2.
    This example readsinformation from a file called testcsv.csv You will need to download this to your task 2 folder Create the program below
  • 3.
    If your resultsdo not match go back and look at your program. Also remember your program and the csv file need to be in the same folder
  • 4.
    Create a csvfile using Excel (add data and save as csv file) Use the data below: Firstname Lastname Address 1 Address 2 Town Postcode Shohaib Khan 15 Town Street Thornton lodge Huddersfield HD1 3NE Tom Smith 12 Newsome road Newsome Huddersfield HD4 6NK Jane Mann 20 Yew Green Road Lockwood Huddersfield HD3 2JL Create a program in Python which will read in the contents of the csv file and print the results to show it has worked successfully.