Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14011

How generate list costumers (chunked) for each month and years , need for booking systhem

$
0
0

i need to understand how i can make a generete list for book list of costumers for each month and years.

In my file .txt i have list mail (like 5000) costumers and need reserve booking for max 500 costumers for each month.

month= ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']year = ['2024', '2025', '2026', '2027', '2028', '2029', '2030', '2031', '2032']l_lines = ['a@a', 'b@b'.... ]def generate_list_email_month(l_lines):    kk = [l_lines[i:i + 500] for i in range(0, len(l_lines), 500)]    mail_k = []    for i,x in enumerate(kk):        list_mails = [y for y in x]        mail_k.append(list_mails)    return mail_kmonth_years = [f"{y}-{x}" for y in monthfor x in year]

Now i need to generate list of 500 costumers booked for month_years like:

Jan-2024 = ['a@a', 'b@b'.... ]Feb-2024 = ['c@c', 'd@d'.... ]

Any suggest for do it ?Thanks

For now i get the same costumers but for each Jan of Year like this:

['aa@aa|Jan-2024', 'aa@aa|Jan-2025', 'aa@aa|Jan-2026']


Viewing all articles
Browse latest Browse all 14011

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>