how can I assign a key to two values and then use functions to enter the key and modify one or both values?
More or less like a database
For example, I create this table using PrettyTable module:
Which approach should I take?
is like a TODO program but with two values and ID’s.
Steps:
ADD:
User press “a” and write a “Scientific Name” and “Common Name”
Then program assing an ID to that to values.
MODIFY:
2) user press “m” and program ask for the ID, user enters ID and program gives the option to change values of “Scientific Name” and then “Common Name”
DESTROY:
3) User enters ID and should be able to destroy a whole row of values.
Dictionaries can’t assing two values to one key.
So, what can I do?
With an ID would be easy modify, search and delete a complete row.
ADD:
User press “a” and write a “Scientific Name” and “Common Name”
Then program assing an ID to that to values.
MODIFY:
2) user press “m” and program ask for the ID, user enters ID and program gives the option to change values of “Scientific Name” and then “Common Name”
DESTROY:
3) User enters ID and should be able to destroy a whole row of values.