added test for end on empty py list
fixed w_False to correct space