mirror of
https://gitlab.com/mfocko/CodeWars.git
synced 2024-11-08 18:49:07 +01:00
12 lines
301 B
Python
12 lines
301 B
Python
def order(sentence):
|
|
arr = sentence.split(' ')
|
|
result = ''
|
|
count = 1
|
|
for i in range(len(arr)):
|
|
for j in range(len(arr)):
|
|
if str(count) in arr[j]:
|
|
result += arr[j] + ' '
|
|
del arr[j]
|
|
count += 1
|
|
break
|
|
return result.strip()
|