def sort_int_string(this_string):
split_str = this_string.split()
split_str.sort()
join_str = ' '.join(split_str)
return join_str
>>>print(sort_int_string("4 1 -1 -3"))
-1 -3 1 4
This code is meant to produce the proper order of "-3 -1" but for some reason I am getting this output where positive numbers are correct but the negatives are not. Any insight on what I am doing wrong? Thanks!
sorted. You're a machine sir!