list key value pair code example
Example 1: c# keyvaluepair
// When you use foreach to enumerate dictionary elements,
// the elements are retrieved as KeyValuePair objects.
Console.WriteLine();
foreach( KeyValuePair<string, string> kvp in openWith )
{
Console.WriteLine("Key = {0}, Value = {1}",
kvp.Key, kvp.Value);
}
Example 2: python key value pair list
student = {"first_name": "Henry", "last_name": "Smith", "age": 20} # key: value
print(student["first_name"])
>>> Henry