Q. What will be stored in the file school.csv after the following code is executed?
data = [[ 'DRS Delhi', 'Esha', 'Badminton'], ['BTS Patna', 'Abhi', 'Tennis']]
import csv
with open('schoo;.csv', 'w', newline ="") as csvfile:
writer = csv.writer(csvfile, delimiter = ',')
writer.writerow(['School', 'Nickname', 'Sport'])
writer.writerows(data)
Answer :-
'School', 'Nickname', 'Sport'
'DRS Delhi', 'Esha', 'Badminton'
'BTS Patna', 'Abhi', 'Tennis'
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )