1
0
Fork 0
mirror of https://gitlab.com/mfocko/CodeWars.git synced 2024-11-09 19:19:07 +01:00
CodeWars/6kyu/your_order_please/solution.py

13 lines
301 B
Python
Raw Normal View History

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()