posted 5 years ago
Hi Wayne,
Yes the "if/elif/else" construct is often used to solve problems like this . Python does not have a "case..end case" construct in the language so the code shown in the second example is the usual way to address this pythonically. There are more sophisticated ways to let the data drive the selection, but may I suggest that you let that be a learning experience much further in your Python journey? 🙂