TASK DEFINITION: In this task, you are given an input list. A list contains several comma-separated items written within brackets. You need to collate all the alphabetical elements at the start of the list followed by all the numerical elements of the list. Maintain the order in which the alphabetical elements appear in the given input list, and do the same for the numerical elements.
PROBLEM: ['9779', 'z', 'p', 'W', '7659', '2619', 'a', '3109', 'i', 'R', 'a', '5287', 'j', '3473', '4907', '7261', 'h', '5289', '43', 'l', 'M', 'o', 'm']

SOLUTION: z, p, W, a, i, R, a, j, h, l, M, o, m, 9779, 7659, 2619, 3109, 5287, 3473, 4907, 7261, 5289, 43

PROBLEM: ['K', '797', '3531', 't', 'e', '2261']

SOLUTION: K, t, e, 797, 3531, 2261

PROBLEM: ['5327', '1861', '8983', 'J', 'M', '4181', '7333', 'A', '655', 'Z', '5127']

SOLUTION:
J, M, A, Z, 5327, 1861, 8983, 4181, 7333, 655, 5127