How to delimit letters and numbers from a string in an array in Python?

I need to delimit the letters and the numbers from a string in an array in Python.

My array is this one:

kid_count_list = ['Sofia 1', 'Claire Ann 1', 'Joe 3', 'Betty 2', 'Archie 1', 'Phil 1', 'Luke 1']

And I want to make two arrays like these:

names = ['Sofia', 'Claire Ann', 'Joe', 'Betty', 'Archie', 'Phil', 'Luke']
counts = [1, 1, 3, 2, 1, 1, 1]

My approach is this one (being inspired from other questions):

import re

kid_count_list = ['Sofia 1', 'Claire Ann 1', 'Joe 3', 'Betty 2', 'Archie 1', 'Phil 1', 'Luke 1']
names = []
count = []

for element in kid_count_list:
    name = " ".join(re.split("[^a-zA-Z]*", element))
    occurence = int(element.match('/d+/g').join(""))
    names.append(name)
    counts.append(occurence)
    

How to make this work? Thanks a lot!!!

Answer

What about:

names, counts = zip(*[re.fullmatch(r"(D+)s(d+)", s).groups() for s in kid_count_list] 

to get the names as

('Sofia', 'Claire Ann', 'Joe', 'Betty', 'Archie', 'Phil', 'Luke')

and counts as

('1', '1', '3', '2', '1', '1', '1')

They are not lists, but can be easily cast so:

names = list(names)
counts = list(map(int, counts))  # convert the counts to int, too

to get

>>> names
['Sofia', 'Claire Ann', 'Joe', 'Betty', 'Archie', 'Phil', 'Luke']

>>> counts
[1, 1, 3, 2, 1, 1, 1]

We form a regex to match some non-digits (D+) and a space after it s and some digits at the end (d+); and we require this to be a full match i.e. from beginning to end (same as if there were ^ and $ anchors). Then take out the matched groups for each string. At this point we have:

[('Sofia', '1'), ('Claire Ann', '1'), ('Joe', '3'), ('Betty', '2'), ('Archie', '1'), ('Phil', '1'), ('Luke', '1')]

To take out two lists from this, we use zip(*...) construct.