diff options
| author | Abigail <abigail@abigail.freedom.nl> | 2022-01-17 21:11:03 +0100 |
|---|---|---|
| committer | Abigail <abigail@abigail.freedom.nl> | 2022-01-17 21:11:03 +0100 |
| commit | 8e3e74158d5d68493ec4bc6d7f60aa37d0449214 (patch) | |
| tree | 68ea533d59e5b6c5e61200ad3435bd395135a212 /challenge-148/abigail/python | |
| parent | ee9f8c8288170dc442f8199fc1d2f7e45ac4377c (diff) | |
| download | perlweeklychallenge-club-8e3e74158d5d68493ec4bc6d7f60aa37d0449214.tar.gz perlweeklychallenge-club-8e3e74158d5d68493ec4bc6d7f60aa37d0449214.tar.bz2 perlweeklychallenge-club-8e3e74158d5d68493ec4bc6d7f60aa37d0449214.zip | |
Week 148, part 1: 15 languages
Diffstat (limited to 'challenge-148/abigail/python')
| -rw-r--r-- | challenge-148/abigail/python/ch-1.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/challenge-148/abigail/python/ch-1.py b/challenge-148/abigail/python/ch-1.py new file mode 100644 index 0000000000..f0d3591271 --- /dev/null +++ b/challenge-148/abigail/python/ch-1.py @@ -0,0 +1,19 @@ +#!/usr/local/bin/python3 + +# +# See https://theweeklychallenge.org/blog/perl-weekly-challenge-148 +# + +# +# Run as: python ch-1.py +# + +import sys, re + +for i in range (101): + if not (i == 0 or re . search (r'[1789]', str (i)) + or re . search (r'^2.', str (i)) + or re . search (r'[35]$', str (i))): + sys . stdout . write (str (i) + " ") + +sys . stdout . write ("\n") |
