Techboss10
Techboss10 Techboss10
  • 11-11-2020
  • Computers and Technology
contestada

Can someone help me to write a python code to save list form python to CSV file please?​

Respuesta :

Cytokine
Cytokine Cytokine
  • 11-11-2020

f = open("MyFileName.csv", "w")

lst = ["Hello", "Hi", "Bye"]

f.write(str(lst))

f.close()

I didn't necessarily know what you meant by list form. This program works for me in pycharm. I had to install the CSV plugin though. If you encounter any errors, I'll try my best to help you.

Answer Link

Otras preguntas

what are three ways water erodes the surface of earth
on sara's computer, 3/8 of the hard drive is files. Of the files, 1/6 are games . What part of the hard drive is games?
A snowball is launched horizontally from the top of a building at v = 16.9 m/s. If it lands d = 44 meters from the bottom, how high (in m) was the building?
A snowball is launched horizontally from the top of a building at v = 16.9 m/s. If it lands d = 44 meters from the bottom, how high (in m) was the building?
what type of rock is the Haystack rock (igneous, Metamorphic, or Sedimentary)
what are three ways water erodes the surface of earth
on sara's computer, 3/8 of the hard drive is files. Of the files, 1/6 are games . What part of the hard drive is games?
A snowball is launched horizontally from the top of a building at v = 16.9 m/s. If it lands d = 44 meters from the bottom, how high (in m) was the building?
how have computers changed mapmaking in recent years
two methods of active transport