Update list1.py

minor refactor