Can anyone explain why 3 of 4 reviewers rejected this Python edit? The edit is correct and I believe the additional example adds value by making the answer more complete. Adding the example as a separate answer is less valuable since it is so closely related to an existing answer.
Suggested edits exist to make the existing content of the author better, not to add new content (unless the post is Community Wiki, in which case changing the content of the answer is acceptable). The reviewers (correctly in my mind) felt that your edit was adding entirely new content, which is not what the edit system is in place for.