Advertisement
AceScottie

wrong but right math

May 21st, 2019
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. import re, random
  2. def index(sclst):
  3.     return max([ i for i, wd in enumerate(sclst) if re.compile(".\s*").match(wd)])
  4.  
  5. l1 = random.sample(xrange(100), random.randint(0, 100))
  6. l2 = random.sample(xrange(100), random.randint(0, 100))
  7. print("%s + %s = %s" %(index(l1), index(l2), index(l1+l2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement