Whitespace fix in 48.
Whitespace fix in 49.
Removed redundant brackets.
Use lists of digits, not strings.
More idiomatic permutation check in 49.