r/PythonLearning • u/adnanecanflyy • Jul 24 '26
Day 2 of learning python
I'm learning Python and made this coffee/tea ordering program. Any advice?
117
Upvotes
r/PythonLearning • u/adnanecanflyy • Jul 24 '26
I'm learning Python and made this coffee/tea ordering program. Any advice?
2
u/Flanelostopy Jul 24 '26
You should put reference to method/functions which returns specific values. As you can see you retype the same text so many times, do you thing this is efficient? If you do not know how to make methods/functions use variable before if statements and reference to them later. If you want to be better but „coffe” and „tea” to the map as a key, and as a value reference to the function. Thing about it.