+ 2

How to store user input in python.

Hello guys...i have been creating a python program whereby its like a library management system.But i have a problem with storing the data I get from the user. For example the user inputs the book number, Author, book title, the name of student who was issued the book.i need to properly store the data so that it can be accessed easily an changed it when needed. I have tried storing in files but python stores it as tuples which aint behaving well

8th Sep 2019, 10:59 AM
Ngash Algorithm
Ngash Algorithm - avatar
3 ответов
+ 4
From my experience a dict for storing informations is a good option. saving this to a file i would recommend json format. i did a try some weeks ago : https://code.sololearn.com/c6i2Xq4DJvx5/?ref=app
8th Sep 2019, 1:30 PM
Lothar
Lothar - avatar
+ 2
Presuming you don't want to use a data base, I would suggest using csv-files. https://docs.python.org/3/library/csv.html
8th Sep 2019, 12:29 PM
Thoq!
Thoq! - avatar
8th Sep 2019, 11:04 AM
你知道規則,我也是
你知道規則,我也是 - avatar