Question: Write in Python Write a function called scramble_words, which takes a string parameter and returns a string containing the same words but randomly reordered. Randomness
Write in Python
Write a function called scramble_words, which takes a string parameter and returns a string containing the same words but randomly reordered. Randomness means each time you re-run it even with the same input, you're likely to get a different result. Remember weve used the random.randint() function before, and itll be very handy here. The function should discard punctuation before it scrambles.
For example, scramble_words(I do not like green eggs and ham.) might return ham like I not do green and eggs
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
