Demo entry 5862400

sfdaf

   

Submitted by dfsafdsa on Aug 04, 2016 at 10:51
Language: Python 3. Code size: 421 Bytes.

def store(data, *full_names):
    for full_name in full_names:
        names = full_name.split()
        if len(names) == 2: names.insert(1, '')
        labels = 'first', 'middle', 'last'
        for label, name in zip(labels, names):
            people = lookup(data, label, name)
            if people:
                people.append(full_name)
            else:
                data[label][name] = [full_name]

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).