Programming Pandit

c/c++/c#/Javav/Python


Latest Update

Monday, November 23, 2020

Python program to perform write operation with .csv file by G Krishna Chauhan

Source Code

 

import csv


f= open('dnnmais.csv','w',newline='')


tup1=("Name","Class","Roll No")


writer=csv.writer(f)


writer.writerow(tup1)


tup2=("G krishna","M.Tech","1001910503")


writer.writerow(tup2)


f.close()




OUTPUT


Name         Class         Roll No 
G krishna M.Tech         1001910503


No comments:

Post a Comment