I'm new to python - so from a list of predetermined words jumble the letters and return the jumbled letters.
Asked
Active
Viewed 44 times
-4
-
1Welcome to Stackoverflow! We're not a code writing service, so please show what you tried before asking a question - thanks! – Ben Aubin Feb 10 '16 at 21:00
-
@Zapp, please read the advice for new users under the "help" link at the top of the page. You should provide a LOT more detail and also demonstrate that you have at least attempted to think about how to solve the problem yourself. – Feb 10 '16 at 21:05
2 Answers
0
What exactly is the question? It depends if you want to get words that actually make sense or just every kind of anagram. For the first one, you would probably need an dictionary API. For the second one, you would just have to scramble the words in every possible way.

Bitte Wenden
- 100
- 10
-
The question is can you help me create a program that uses words from a created list in python eg. list_anagram [apple, banana, orange] and jumbles the letters for each word and then returns each of the words as an anagram. If that makes sense? – Zapp Feb 10 '16 at 21:05
-
You will need to write the program yourself. For each word in a list, you want to get exactly one anagram? – Bitte Wenden Feb 10 '16 at 21:07
0
>>> import random
>>> word_list = ['apple', 'banana', 'orange']
>>> shuffled_list = [''.join(random.sample(s,len(s))) for s in word_list]
>>> shuffled_list
['pepal', 'abanan', 'raoegn']

pp_
- 3,435
- 4
- 19
- 27
-
Hi @Zapp if this answer has solved your question please consider [accepting it](http://meta.stackexchange.com/q/5234/179419) by clicking the check mark. – pp_ Feb 10 '16 at 21:24