I'm trying to add the values from a dictionary into a new list, but without anything remotely fancy, including the value method. I was able to add the keys to a new list with newList.append(item) in a for loop. But I'm trying to add the values to a separate list. Here is the problem I'm solving along with my code so far:
If you remember, the .items() dictionary method produces a sequence of tuples. Keeping this in mind, we have provided you a dictionary called pokemon. For every key value pair, append the key to the list p_names, and append the value to the list p_number. Do not use the .keys() or .values() methods.
pokemon = {'Rattata': 19, 'Machop': 66, 'Seel': 86, 'Volbeat': 86, 'Solrock': 126}
p_names = []
p_number = []
for item in pokemon:
p_names.append(item)