sort a string which contains words and integers with the restriction that if the nth element in the list is an integer it must remain an integer and if it is a word, it must remain a word.
Test : car apple 2 babe 3 1
RESULT :
{0: 'car', 1: 'apple', 3: 'babe'} {2: '2', 4: '3', 5: '1'}
['apple', 'babe', 'car'] ['1', '2', '3']
{0: 'apple', 1: 'babe', 3: 'car'} {2: '1', 4: '2', 5: '3'}
apple babe 1 car 2 3
TEST: car apple 2 babe 3 1
RESULT: apple babe 1 car 2 3