Skip to content

Instantly share code, notes, and snippets.

@tmspzz
Created October 9, 2015 12:36
Show Gist options
  • Save tmspzz/beb173b3eea5fd92af45 to your computer and use it in GitHub Desktop.
Save tmspzz/beb173b3eea5fd92af45 to your computer and use it in GitHub Desktop.
#!/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