Last active
July 15, 2019 15:08
-
-
Save niphadkarneha/bb961ef5fabf3878a1a89f2f8b9c70f6 to your computer and use it in GitHub Desktop.
This file contains 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
# Python program to printout possible combination of words or letters given by user. | |
import itertools | |
s = input("Input a word or any random string: ") | |
#Changing the number in the bracket will print list of words with that length. | |
#To use the length of the input, type in (s, len(s)) | |
t=list(itertools.permutations(s, 3)) | |
for i in range(0,len(t)): | |
print(''.join(t[i])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment