Optimizing Small Python Code

Benjamin Schollnick bschollnick at schollnick.net
Tue Jun 22 20:00:16 EDT 2021


How would you measure the steps that it takes?

	- Benjamin



> On Jun 22, 2021, at 7:04 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> 
> On 23/06/21 3:03 am, Kais Ayadi wrote:
>> for n in range(1, 7):
>>     print (n)
>>     for x in range(0, n):
>>         print("     ", x)
>> can this code be more optimised?
> 
> Optimised for what? Readability? Execution speed? Code size?
> Memory usage?
> 
> -- 
> Greg
> -- 
> https://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list