Python Forum
Changing the content of the table and saving the new data into another file
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing the content of the table and saving the new data into another file
#2
name = input("restaurant name is: ")
address = input("restaurant address is: ")
lonlat = input("coordinates are: ")
new_row = list((name, address, lonlat))
table.append(new_row)
print(table[-1])
with open("GermanRestaurants_v1.csv", mode="w") as handler:
file_writer = csv.writer(handler)
for row in table:
file_writer.writerow(row)
Reply


Messages In This Thread
RE: Changing the content of the table and saving the new data into another file - by femke_pythonquestion123 - Sep-18-2020, 12:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating Data Set for Changing Oscillation Motion jcraw77 1 1,947 Jun-19-2020, 03:41 AM
Last Post: ndc85430
  Saving to Json file Shambob1874 1 2,492 May-30-2018, 10:00 PM
Last Post: micseydel
  Login Module Help - Comparing data in a text file to data held in a variable KeziaKar 0 2,265 Mar-08-2018, 11:41 AM
Last Post: KeziaKar
  file a table of values Ybivashka322 4 3,750 Dec-14-2017, 06:11 PM
Last Post: mpd
  Saving the results from an input in a txt. file pythonenthusiast 2 2,727 Nov-28-2017, 03:52 PM
Last Post: wavic
  Presenting data from a dictionary in a basic table ijosefson 3 3,340 Oct-16-2017, 04:13 AM
Last Post: Larz60+
  Saving an numpy.ndarray as .ply file in python Tina 4 17,154 Oct-11-2017, 06:08 PM
Last Post: Tina

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020