Coding Practices For Python Loop