Closed ouillie closed 8 years ago
The original code was using nested if statements when it should've used logical and. The outer if was passing but the inner if was failing, so it would skip the outer else and return None. Using dict.get simplifies the condition.
+1
The original code was using nested if statements when it should've used logical and. The outer if was passing but the inner if was failing, so it would skip the outer else and return None. Using dict.get simplifies the condition.