mirror of
https://gitlab.com/mfocko/CodeWars.git
synced 2024-11-09 19:19:07 +01:00
13 lines
301 B
Python
13 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()
|