Skip to content

Instantly share code, notes, and snippets.

@sennajox
Created December 19, 2016 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sennajox/505cf5e90c0b545a1ce91d9dae5618b2 to your computer and use it in GitHub Desktop.
Save sennajox/505cf5e90c0b545a1ce91d9dae5618b2 to your computer and use it in GitHub Desktop.
roll
#!/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