Update prob41.py

better solution