Created
December 19, 2016 03:27
-
-
Save sennajox/505cf5e90c0b545a1ce91d9dae5618b2 to your computer and use it in GitHub Desktop.
roll
This file contains hidden or 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/env python2 | |
# coding=utf8 | |
import sys, os | |
import random | |
import time | |
if __name__ == "__main__": | |
curtime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time())) | |
print curtime | |
r = range(0, 5) | |
print "%s => %s" % ("total", r) | |
ret = random.sample(r, 3) | |
print "%s => %s" % ("result", ret) | |
exit(0) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment