Python--Faster-Way
Python--Faster-Way copied to clipboard
Python: Faster Way
Would it be possible to make it a Github static site?
while ``` python l.sort() ``` works in place (modifying the original list), ``` python sorted(l) ``` returns a new list. Even when in same cases is the same using one...
In almost every instance you use range, you should instead be using xrange. Test 16 is especially painful to look at as range(1000) already creates an array with the integers...
That might be don't give the expected result. If it gives the right result is dependent of the python implementation and on cpython it depends how big is 2. if...