Ask Anything Monday - Weekly Thread

Hello. I am making a function where if the user puts in a name of the file, it changes the default name of that file the to users input. If he does not enter a name, then the function should automatically load the default file. Here is the question for better clarification.

Load(L) - prompts for the name of a rolodex file. If the user enters no file name, it will use the current default Rolodex name, “default.rol”. If the user enters a name, that entered name becomes the current default name of the Rolodex which will be the default when the Rolodex is saved. If the file exists, you will add all the contacts from the given Rolodex file into the current Rolodex dictionary stored in memory, note if the user runs the program, loads rolodex file A, then loads rolodes file B, the current rolodex in memory will contain the contacts in both A and B. Each Load will change the default Rolodex name, so if the user then saves, B will be the current default rolodex name. When the user saves or quits, use the current Rolodex name as the file name to store the current Rolodex contacts to.

/r/learnpython Thread