diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2020-09-15 07:49:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-15 07:49:33 +0100 |
| commit | 38f6d006de1fbb226fee0b273bbfb9e766aa76b4 (patch) | |
| tree | 838f0cdc7629cf7da79b4b8afccebf37a738e5d6 /challenge-078/walt-mankowski/python/ch-2.py | |
| parent | 0af76fecc34594e0df626cbef22bb26112e6bdeb (diff) | |
| parent | 9467640e2c7b6e28ddb8b3babc2b39442aeb9b68 (diff) | |
| download | perlweeklychallenge-club-38f6d006de1fbb226fee0b273bbfb9e766aa76b4.tar.gz perlweeklychallenge-club-38f6d006de1fbb226fee0b273bbfb9e766aa76b4.tar.bz2 perlweeklychallenge-club-38f6d006de1fbb226fee0b273bbfb9e766aa76b4.zip | |
Merge pull request #2296 from waltman/branch-for-challenge-078
Branch for challenge 078
Diffstat (limited to 'challenge-078/walt-mankowski/python/ch-2.py')
| -rw-r--r-- | challenge-078/walt-mankowski/python/ch-2.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/challenge-078/walt-mankowski/python/ch-2.py b/challenge-078/walt-mankowski/python/ch-2.py new file mode 100644 index 0000000000..0d72428167 --- /dev/null +++ b/challenge-078/walt-mankowski/python/ch-2.py @@ -0,0 +1,10 @@ +from sys import argv + +def rotate_by(b, a): + return a[b:] + a[0:b] + +a = [int(x) for x in argv[1].split(' ')] +b = [int(x) for x in argv[2].split(' ')] + +for x in b: + print(rotate_by(x, a)) |
