Guido van Rossum | c636014 | 1990-10-13 19:23:40 +0000 | [diff] [blame^] | 1 | # Module 'util' -- some useful functions that dont fit elsewhere |
2 | |||||
3 | # Remove an item from a list at most once | ||||
4 | # | ||||
5 | def remove(item, list): | ||||
6 | for i in range(len(list)): | ||||
7 | if list[i] = item: | ||||
8 | del list[i] | ||||
9 | break |