Python - Resize Keys in dictionary
Given Dictionary, resize keys to K by getting starting k elements from keys. Input : test_dict = {"geeksforgeeks" :3, "best" :3, "coding" :4, "practice" :3}, K = 3 Output : {'gee': 3, 'bes': 3, 'cod': 4, 'pra': 3} Explanation : Keys resized to have 3 elements. Input : test_dict = {"geeksforgeeks" :3