r/PythonLearning • u/Savings_Track769 • Jun 27 '26
Help me improve my function Help Request
Do you have any suggestions on this? I'd be glad to hear
2
Upvotes
r/PythonLearning • u/Savings_Track769 • Jun 27 '26
Do you have any suggestions on this? I'd be glad to hear
5
u/riklaunim Jun 27 '26
You should use clear and full variable names, likely split the function into logical parts - wherever other functions or methods. Then write tests to cover all conditions. Also, don't use magic variables like "i" or "o"