diff options
| author | Abigail <abigail@abigail.freedom.nl> | 2022-01-04 14:49:23 +0100 |
|---|---|---|
| committer | Abigail <abigail@abigail.freedom.nl> | 2022-01-04 14:49:23 +0100 |
| commit | 4bb05f879039205fc2ea5fbaf16ed9d706fd064a (patch) | |
| tree | a41402148e2cda14e91315f9d2dde71298db965b /challenge-001/abigail/python/ch-1.py | |
| parent | 102d9a146d673a3b1f0d4744098788c46f74266e (diff) | |
| download | perlweeklychallenge-club-4bb05f879039205fc2ea5fbaf16ed9d706fd064a.tar.gz perlweeklychallenge-club-4bb05f879039205fc2ea5fbaf16ed9d706fd064a.tar.bz2 perlweeklychallenge-club-4bb05f879039205fc2ea5fbaf16ed9d706fd064a.zip | |
Week 1: Fix Python errors.
Diffstat (limited to 'challenge-001/abigail/python/ch-1.py')
| -rw-r--r-- | challenge-001/abigail/python/ch-1.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/challenge-001/abigail/python/ch-1.py b/challenge-001/abigail/python/ch-1.py index 193586bcf6..ddb4e89f78 100644 --- a/challenge-001/abigail/python/ch-1.py +++ b/challenge-001/abigail/python/ch-1.py @@ -1,11 +1,14 @@ +#!/opt/local/bin/python + # -# See ../READE,md +# See https://theweeklychallenge.org/blog/perl-weekly-challenge-000 # # -# Run as python ch-1.py < input-file +# Run as: python ch-1.py < input-file # + import fileinput for line in fileinput . input (): - print line . replace ("e", "E"), line . count ("e") + print (line . replace ("e", "E"), line . count ("e")) |
