Find the most frequent element in a list, with ties resolved by first appearance.
Constraints
Example
```python >>> mode([1, 2, 2, 3]) 2 >>> mode([1, 1, 2, 2]) 1 >>> mode([]) is None True >>> mode(['a', 'b', 'b', 'c', 'a']) 'a' ```
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints