I am currently trying to reformat the strings below to fit the following format (date,number,number,number,number,number).
03262019,3   10  19  30  38
03252019,7   17  23  24  31
03242019,3    7   12  23  32
03232019,6    9   14  19  28
03222019,5   11  12  13  25
into:
03262019,3,10,19,30,38
03252019,7,17,23,24,31
03242019,3,7,12,23,32
03232019,6,9,14,19,28
03222019,5,11,12,13,25
Code:
import requests
from bs4 import BeautifulSoup
from datetime import datetime
response = requests.get('https://www.lotterycorner.com/mi/fantasy-5/2019')
soup = BeautifulSoup(response.text, 'html.parser')
date = soup.find_all("td", {"class":"win-nbr-date col-sm-3 col-xs-4"})
results = soup.find_all("ul",{"class":"nbr-grp"})
for date, results in zip(date, results):
    date2 = (date.get_text())
    date = (datetime.strptime(date2, '%b %d, %Y'))
    Fantasy52019 = (date.strftime("%m%d%Y")+(',')+results.get_text().strip())
    print(Fantasy52019)
and these strings:
03262019,4  14224358 Mega Ball   9 Megaplier  3  X
03222019,7  36586062 Mega Ball  10Megaplier  3  X
03192019,10 42536768 Mega Ball  15Megaplier  3  X
03152019,3  29566264 Mega Ball   4 Megaplier  3  X
03122019,10 12164957 Mega Ball  18Megaplier  4  X
03082019,4   9 426268 Mega Ball   7 Megaplier  4  X
03052019,15 20323752 Mega Ball   6 Megaplier  5  X
into:
03262019,4,14,22,43,58,9
03222019,7,36,58,60,62,10
03192019,10,42,53,67,68,15
03152019,3,29,56,62,64,4
03122019,10,12,16,49,57,18
03082019,4,9,42,62,68,7
03052019,15,20,32,37,52,6
