repl.it
Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
def order(sentence):
  lst = []
  counter = 1
  sent = sentence.split()
  for word in sent:
    for word in sent:
      if str(counter) in word:
          lst.append(word)
          if counter != len(sent):
              lst.append(' ')
          counter += 1
          break
  string = ''
  for i in range(len(lst)):
      string += lst[i]
  print(string)
blah = input("")
order(blah)xxxx
?