Mercurial > fragmenty
changeset 25:dc0d4213b909
zawijanie linii
| author | Radomir Dopieralski |
|---|---|
| date | Wed, 31 Oct 2012 12:36:10 +0100 |
| parents | 640667a240c9 |
| children | eabf7897f8d2 |
| files | docs/Szukanie%20yap-%C3%B3w |
| diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/docs/Szukanie%20yap-%C3%B3w Wed Oct 31 12:35:21 2012 +0100 +++ b/docs/Szukanie%20yap-%C3%B3w Wed Oct 31 12:36:10 2012 +0100 @@ -1,7 +1,10 @@ {{{#!python >>> data = u'yap foo yup bar yep yelp' ->>> for prev_item, this_item, next_item in zip(data, data[1:], data[2:]): -... if prev_item.lower() == 'y' and next_item.lower() == 'p': +>>> for prev_item, this_item, next_item in zip(data, + data[1:], + data[2:]): +... if (prev_item.lower() == 'y' and + next_item.lower() == 'p'): ... print prev_item + this_item + next_item ... yap
