Python - Columns to Dictionary Conversion in Matrix
Given a Matrix, Convert to Dictionary with elements in 1st row being keys, and subsequent rows acting as values list. Input : test_list = [[4, 5, 7], [10, 8, 4], [19, 4, 6], [9, 3, 6]] Output : {4: [10, 19, 9], 5: [8, 4, 3], 7: [4, 6, 6]} Explanation : All columns mapped with 1st row elements. Eg. 4