In this example we will show how to return values of a dictionary using the values() method in Python.
Source Code
mydict = {
'name': 'Steven',
'age': 24,
'ID': 123456
}
for x in mydict.values():
print(x)
Output:
Steven
24
123456
In this example we will show how to return values of a dictionary using the values() method in Python.
mydict = {
'name': 'Steven',
'age': 24,
'ID': 123456
}
for x in mydict.values():
print(x)
Output:
Steven
24
123456