2017-01-30 | Paul Boddie | file changeset files shortlog | Changed string and Unicode slicing methods with use of the generic sequence slicing functionality, producing string/Unicode results. This is less efficient than using the substring native functions, but it reduces code complexity. |
paul@2 | 1 | def f(l, y): |
paul@2 | 2 | return [x for x in l if x > y] |
paul@2 | 3 | |
paul@2 | 4 | result = f([1, 2, 3], 2) |