8th day of python challenges 111-117
This commit is contained in:
16
challenges111-117/challenge-112.py
Normal file
16
challenges111-117/challenge-112.py
Normal file
@@ -0,0 +1,16 @@
|
||||
file_read = open('Books.csv', 'r')
|
||||
for row in file_read:
|
||||
print(row)
|
||||
file_read.close()
|
||||
|
||||
ask_name = str(input('Enter Book Name : '))
|
||||
ask_author = str(input('Enter Book Author : '))
|
||||
ask_year = str(input('Enter Book Year Released : '))
|
||||
file_write = open('Books.csv', 'a')
|
||||
file_write.write(ask_name + ', ' + ask_author + ', ' + ask_year + '\n')
|
||||
file_write.close()
|
||||
|
||||
file_read_last = open('Books.csv', 'r')
|
||||
for row in file_read_last:
|
||||
print(row)
|
||||
file_read_last.close()
|
||||
Reference in New Issue
Block a user