Python: Modernise Statements/ queries

Almost. Left out a few things marked with TODO
This commit is contained in:
Rasmus Wriedt Larsen
2020-02-12 13:01:05 +01:00
parent 83d40f167b
commit 13568b7b9f
22 changed files with 129 additions and 110 deletions

View File

@@ -3,13 +3,13 @@
"qhelp.dtd">
<qhelp>
<overview>
<p>If you concatenate strings in a loop then the time taken by the loop is quadratic in the number
<p>If you concatenate strings in a loop then the time taken by the loop is quadratic in the number
of iterations.</p>
</overview>
<recommendation>
<p>Initialize an empty list before the start of the list.
<p>Initialize an empty list before the start of the loop.
During the loop append the substrings to the list.
At the end of the loop, convert the list to a string by using <code>''.join(list)</code>.</p>