You may wish to consider using a different structure for your data, something that keeps all the data for each person together. With only two people and with only two attributes for each person, it doesn't really matter, but if you have lots of people and lots of attributes it only takes a single error in one of your lists to destroy the synchronisation. And if that happens, one or more of the people in your database will get the wrong data associated with them.
One possibility is to use a list of dicts, one dict for each person, eg
new_people = [
{'age': 56, 'name': 'john'},
{'age': 64, 'name': 'peter'}
]
And then you can easily print it by doing something like this:
for d in new_people:
print('My name is {0}, I am {1} years old.'.format(d['name'], d['age']))
Output:
My name is john, I am 56 years old.
My name is peter, I am 64 years old.
It's not that hard to convert your existing People dict to a list of dicts. It's probably more readable to do it with a couple of for
loops, but I did it with this nested list comprehension / generator expression:
new_people = [dict(t) for t in (((k,v[i]) for k,v in People.items()) for i in range(len(People['name'])))]
PS. It's a convention in Python to use lower-case names for normal variables. Names beginning with an upper-case letter, like People, are usually used for classes. You don't have to follow that convention, but it does make it easier for people who are reading your code. You may notice that in the code you posted above People is in a light blue colour, that's because the SO code formatter thinks its a class name.