trapping rain water in python