Skip to content

Commit dcc322c

Browse files
authored
Update Exercises.rst
Fix exercise on finding the max so that it will work over all integers, not just for lists with positive numbers.
1 parent 51c5c53 commit dcc322c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

_sources/Lists/Exercises.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ Exercises
201201
.. activecode:: lst_q5_answer
202202

203203
def max(lst):
204-
max = 0
204+
max = lst[0]
205205
for e in lst:
206206
if e > max:
207207
max = e

0 commit comments

Comments
 (0)