Last active
September 27, 2017 07:29
-
-
Save ChristianBagley/9745d392ec27162478f104cb4b171f17 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import permutations | |
def nextBiggest(): | |
inputNumber = str(input('Enter number: ')) | |
for i in sorted(permutations(str(inputNumber))): | |
nextNumber = int(''.join(i)) | |
if nextNumber > int(inputNumber): | |
print(nextNumber) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment