add condition to sample py code
Remove trailing whitespace
Merge pull request #104 from STIXProject/add-condition-to-py

add condition to sample py code