mirror of
https://github.com/kennethreitz/python-guide.git
synced 2026-06-05 14:50:19 +00:00
The wrong variable is checked and appended in this example code block.
This commit is contained in:
@@ -219,8 +219,8 @@ operations on lists using a different concise syntax.
|
||||
a = [3, 4, 5]
|
||||
b = []
|
||||
for i in a:
|
||||
if a > 4:
|
||||
b.append(a)
|
||||
if i > 4:
|
||||
b.append(i)
|
||||
|
||||
**Good**:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user