title: Switch indexes, create the next highest number using the same exact 9 digits presented
body: <p>So I received a challenge that states the following:
  "Design a program that takes as input a 9 digit number where no digit appears twice and produces as output an arrangement of the same 9 digits corresponding to the next highest number. If no such number exists, the algorithm should indicate this. So for example, if the input is 781623954 the output would be 781624359." </p>
  
  <p>So I came up with this idea to flip the indexes, so check the last index with the one right before to see which is bigger and compare then flip if necessary but for some reason my code isn't working. I only did the work for checking the last two digits not all the digits, so if you can help me out and check it for me and if you have any better ideas on how to tackle this problem, please share.</p>
  
  <pre><code>input = raw_input("Enter 9 Digits: ")
  x = 9
  while x&gt;0:
      x-=1
      if input[8] &gt; input[7]:
          temp = input[8]
          input[8] == input[7] 
          input[7] == temp
          print input
          break
  </code></pre>