Wow! OK, now, create a class named Player that has those same three attributes, last_name, first_name, and score. I should be able to set them through __init__.
import re
string = '''Love, Kenneth: 20
Chalkley, Andrew: 25
McFarland, Dave: 10
Kesten, Joy: 22
Stewart Pinchback, Pinckney Benton: 18'''
players = re.search(r'''
^(?P<last_name>[-\w\s?]*),\s # Last Names
(?P<first_name>[-\w\s?]+):\s # First Names
(?P<score>[\d]+) # Score
$''', string, re.X|re.M) # VERBOSE and MULTILINE
class Player:
last_name = str()
first_name = str()
score = str()
def __init__(self, **players.groupdict()):
self.last_name = input('last name: ')
self.first_name = input('first_name: ')
self.score = input('score: ')