Skip to content

Commit 337081a

Browse files
committed
new version that splits the string on a regex
1 parent 8ed85cb commit 337081a

3 files changed

Lines changed: 3 additions & 69 deletions

File tree

inputs/the-bustle.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The bustle in a house
22
The morning after death
33
Is solemnest of industries
4-
Enacted upon earth,
4+
Enacted upon earth,--
55

66
The sweeping up the heart,
77
And putting love away

scrambler/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Write a Python program called `scrambler.py` that will take a single position po
44

55
Cf. Typoglycemia https://www.dictionary.com/e/typoglycemia/
66

7+
We'll need to use the same algorithm for scrambling the words. I used the `random.shuffle` method to mix up the letters in the middle, being sure that the word that gets created is not the same as the word that you are given. If the word is 3 characters or shorter, just return the word unchanged.
8+
79
````
810
$ ./scrambler.py
911
usage: scrambler.py [-h] [-s int] STR

scrambler/solution.py

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)