input_list = ["G1","G2","G5","G4","G3","R1","R2","R3","R5","R4"]
output_list = ["R1","R2","R3","R4","R5""G1","G2","G3","G5","G4"]
Code I tried:
new_list = []
for i in sorted(input_list):
new_list.append(i)
print (new_list[::-1])
Actual Output : ['R5', 'R4', 'R3', 'R2', 'R1', 'G5', 'G4', 'G3', 'G2', 'G1']
Expected Output : ["R1", "R2", "R3", "R4", "R5", "G1", "G2", "G3", "G5", "G4"]