I found this code on this site to find the second largest number:

```
def second_largest(numbers):
m1, m2 = None, None
for x in numbers:
if x >= m1:
m1, m2 = x, m1
elif x > m2:
m2 = x
return m2
```

Source: Get the second largest number in a list in linear time

Is it possible to modify this code to find the second *smallest* number? So for example

```
print second_smallest([1, 2, 3, 4])
2
```

## Best Answer