title: Reverse string sentence with for loop?
body: <p>last week Friday I had the challenge of creating a function which that capitalized all of the even words within a sentence, and reversed each odd word within a sentence. I was wondering, how would I go about using the same for loop I created to simply reverse the entire sentence itself, without capitalizing anything. </p>
  
  <p>Here is the function I wrote: </p>
  
  <pre><code>def the_sentence(words):
  sentence = words
  new_sent = sentence.split(" ")
  for x in range(len(new_sent)):
      if x % 2 == 0 :
          new_sent[x] = new_sent[x].upper()
  
      else:
          new_sent[x]=new_sent[x][::-1]
  print(new_sent)
  </code></pre>
  
  <p>Thanks for the help!</p>