diff options
| author | 冯昶 <fengchang@novel-supertv.com> | 2024-09-02 15:40:05 +0800 |
|---|---|---|
| committer | 冯昶 <fengchang@novel-supertv.com> | 2024-09-02 15:40:05 +0800 |
| commit | 0c04a0825fd1dc67c5295fffdfbf3cb90ba075b8 (patch) | |
| tree | d963a7fe57782d1d25580ea05c96f969768e8067 /challenge-045/paulo-custodio/python/ch-2.py | |
| parent | 30a42138e1d8bdd2f174e06fb18515ced0b2b241 (diff) | |
| parent | 0512711fccf91c731495f1dd901349cc900ec299 (diff) | |
| download | perlweeklychallenge-club-0c04a0825fd1dc67c5295fffdfbf3cb90ba075b8.tar.gz perlweeklychallenge-club-0c04a0825fd1dc67c5295fffdfbf3cb90ba075b8.tar.bz2 perlweeklychallenge-club-0c04a0825fd1dc67c5295fffdfbf3cb90ba075b8.zip | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'challenge-045/paulo-custodio/python/ch-2.py')
| -rw-r--r-- | challenge-045/paulo-custodio/python/ch-2.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/challenge-045/paulo-custodio/python/ch-2.py b/challenge-045/paulo-custodio/python/ch-2.py new file mode 100644 index 0000000000..28fd2e75d4 --- /dev/null +++ b/challenge-045/paulo-custodio/python/ch-2.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 + +# Challenge 045 +# +# TASK #2 +# Source Dumper +# Write a script that dumps its own source code. For example, say, the script +# name is ch-2.pl then the following command should returns nothing. +# +# $ perl ch-2.pl | diff - ch-2.pl + +import sys + +file = open(sys.argv[0]) +print(file.read(), end='') |
