Question 1
Write a single line code to get the value of "type" from the given dictionary in such a way that it does not produce any error or exception even if any key from the dictionary is misspelled. e.g. batters is misspelled as bateers. Still, your code must traverse the dictionary and fetch the value “Regular” of the key “type”. { "batters": { "batter": [ { "batter": [ { "batter": [{ "type": "Regular" }] }] }] } }
len, count, title, lower, upper, find, rfine, replace