a guest Dec 6th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import re
- p_confrontations = 'Totally, 7 game(s) over, 8 game(s) under 7 game(s) half-game over, 8'
- over_under = re.findall(r'Totally, (\d+) game\(s\) over, (\d+)', p_confrontations)
- over_under_ratio = int(over_under)/(int(over_under)+int(over_under))
- over_under2 = re.findall(r'(\d+) game\(s\) half-game over, (\d+)', p_confrontations)
- over_under2_ratio = int(over_under2)/(int(over_under2)+int(over_under2))
- head_to_heads = dict()
- head_to_heads['over/under 0.75'] = over_under_ratio
- head_to_heads['over/under 2.5'] = over_under2_ratio
RAW Paste Data