Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- from matplotlib import *
- regex = r'[d]{1,8}, [d]{1,8}'
- result = []
- with
- open('data.txt')
- as f:
- lines = f.readlines()
- for line in lines:
- match = re.findall(regex, line)
- if match != []:
- splitted = match[0].split(',')
- mapped = list(map(float, splitted))
- result.append(mapped)
- # print(result)
- x, y = result
- print(x, y)
- text
- text
- 56, 67
- 1002019, 232019
- 45, 98
- 1002009, 232089
- text
- text
- text
Add Comment
Please, Sign In to add comment