I wish to do this but for a dictionary:
\"My string\".lower()
Is there a built in function or should I use a loop?
def convert_to_lower_case(data): if type(data) is dict: for k, v in data.iteritems(): if type(v) is str: data[k] = v.lower() elif type(v) is list: data[k] = [x.lower() for x in v] elif type(v) is dict: data[k] = convert_to_lower_case(v) return data