Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions chapters/sorting_searching/selection/code/python/selection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
def selectionList(lst):
for i in range(0, len(lst)):
if i < len(lst):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what this if statement is doing. Could you please explain?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really can't remember what was the purpose of that, and it seems wrong from looking at it now, I'm ashamed of this tbh, I code better than this now I promise

lst[i] = i
return lst
t = [1,0,3,2,6,4,5,9,7,8]
print(selectionList(t))