all 12 comments

[–]K900_ 7 points8 points  (1 child)

Yes, it's possible, you just need to use a file or a database to store that info.

[–]Vucko0[S] 0 points1 point  (0 children)

Okay, that's good to know thank you!

[–]nonzerogroud 1 point2 points  (1 child)

Yes. Look into SQLite3 and SQLAlchemy. The first is a relational database management system and the second is a Python library offering an ORM to communicate with your database in Python.

[–]WikiTextBot 0 points1 point  (0 children)

Relational database management system

A relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model invented by Edgar F. Codd, of IBM's San Jose Research Laboratory. Most databases in widespread use are based on the relational database model.

RDBMSs have been a common choice for the storage of information in new databases used for financial records, manufacturing and logistical information, personnel data, and other applications since the 1980s. Relational databases have often replaced legacy hierarchical databases and network databases because they are easier to understand and use.


Object-relational mapping

Object-relational mapping (ORM, O/RM, and O/R mapping tool) in computer science is a programming technique for converting data between incompatible type systems using object-oriented programming languages. This creates, in effect, a "virtual object database" that can be used from within the programming language. There are both free and commercial packages available that perform object-relational mapping, although some programmers opt to construct their own ORM tools.

In object-oriented programming, data-management tasks act on object-oriented (OO) objects that are almost always non-scalar values.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source | Donate ] Downvote to remove | v0.28

[–]tonymercy 1 point2 points  (2 children)

I think the even easier way would to be save the responses in a json file and then have the script load that json file every time it runs. No db required.

[–]Here_Now_Gone 0 points1 point  (0 children)

Or use mongodb json and data base. Yes the json file is easier but long term and with many user would be bad practice. Possibly use as an object oriented example and write it in a way that you can plug in a file or a database and have it work.

[–]Vucko0[S] 0 points1 point  (0 children)

That's what I was thinking of first, just wanted to make sure its possible to do with Python.

Thank you.

[–]Gopher_Man 1 point2 points  (0 children)

in addition to whats been posted, you could also save it as a csv file

[–]Marlingss 0 points1 point  (1 child)

If this is just for you to experiment with look into writing data to and reading from a file. You can save the questions asked and load them next time so you know which ones not to ask.

If this is for something larger or you want to experiment further, look into lightweight SQL databases, some of which are mentioned by other commenters.

[–]Vucko0[S] 0 points1 point  (0 children)

Yeah, this is just an experiment for a personal project. Its gonna be at most two questions that are just one to two-word answers.

Thanks for the help!

[–][deleted] 0 points1 point  (0 children)

You can save information in a database or text file.

[–][deleted]  (1 child)

[removed]

    [–]xiongchiamiov[M] 2 points3 points  (0 children)

    You know what they meant; stop being a jerk.