The get( ) Function is used get a 'Value' associated with a 'Key' in a Dictionary.
x = { 5 : "Is a Number", "John": "Is a Name", "Python": "Is a Language" } y = x.get("John") print(y)
So, in the above code we have created a 'Dictionary' using braces '{ }' and 'Key' and 'Value' pairs.
x = { 5 : "Is a Number", "John": "Is a Name", "Python": "Is a Language" }
And initialised to the variable 'x'.
Then we have used the 'get( )' Function to get the 'Value' associated with the 'Key', 'John'.
The 'Value' associated with the 'Key', 'John' is 'Is a Name'. And that is assigned to 'y'.