Created
October 9, 2015 12:36
-
-
Save tmspzz/beb173b3eea5fd92af45 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
from operator import mul | |
if __name__ == "__main__": | |
try: | |
if len(sys.argv) > 1: | |
print reduce(mul, map(int, sys.argv[1:]), 1) | |
else: | |
print 0 | |
except: | |
print "Works only with integers" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment