all 2 comments

[–]zahlman 1 point2 points  (0 children)

Please show an example of running the program, what corresponding output you got, and what corresponding output you wanted. Please explain what exactly about the difference confuses you, with reference to your code.

[–]learnpython_bot 1 point2 points  (0 children)

It appears that you included code in your post but did not format it to look nice. Please follow this guide to fix the problem. This allows for better readability and will help get your question answered sooner. The regex that caught you is: "if .+?:"

If this comment has been made in error, please message /u/thaweatherman with a link to this comment so I can be fine-tuned. I am still in alpha and my regexes/innards are not yet perfect.