Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re, random
- def index(sclst):
- return max([ i for i, wd in enumerate(sclst) if re.compile(".\s*").match(wd)])
- l1 = random.sample(xrange(100), random.randint(0, 100))
- l2 = random.sample(xrange(100), random.randint(0, 100))
- print("%s + %s = %s" %(index(l1), index(l2), index(l1+l2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement