Skip to content

Latest commit

 

History

History
5 lines (4 loc) · 342 Bytes

README.md

File metadata and controls

5 lines (4 loc) · 342 Bytes

Exercise 3-3

Write a function expand(s1, s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2. Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. Arrange that a leading or trailing - is taken literally.