PhoneList = ['John:009878788677', 'Jefrey:67654654645', 'Maria:8787677766']
numbers = {a: b for item in PhoneList for a, _, b in (item.partition(':'),)}
print(numbers)
print("%s's number is %s." % ('John', numbers['John']))
Substring Comparison in python