diff --git a/README.md b/README.md index a337226..28e66a2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[](https://mybinder.org/v2/gh/aprabaka/htn-challenge-2019/master) + # ApplyBoard Hack the North Lightning Challenge 🎓
diff --git a/python_solution.py b/python_solution.py index 2c14cc2..996162f 100644 --- a/python_solution.py +++ b/python_solution.py @@ -5,8 +5,20 @@ def refine_parameters(data: dict): Returns: Return a dictionary of cleaned input ''' - clean_dict = {} + clean_dict = dict - # Write your code here. + for x in dict: + if str(int(dict[x])) == dict[x]: + clean_dict[x] = int(dict[x]) + elif dict[x] == "True": + clean_dict[x] = True + elif dict[x] == "False": + clean_dict[x] = False + elif isinstance(dict[x], list): + refine_parameters(dict[x]) + elif isinstance(dict[x], dict): + refine_parameters(dict[x]) + else: + clean_dict[x] = dict[x] return clean_dict