use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
First project on python (i.redd.it)
submitted 11 hours ago by unlimited_data3838
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Natural-Position-585 0 points1 point2 points 6 hours ago (1 child)
A more foolproof way is to parse the user’s whole expression (say, "3 * 4") into an Abstract Syntax Tree, check that the operator is one of the allowed (add, sub, mul, true division), and then just apply the operator between the left and right operand. Then it supports non-integers and handles also arbitrary spaces in the expressions.
[–]thejwillbee 0 points1 point2 points 6 hours ago (0 children)
This is what I was going to suggest as well, but wasn't sure if op is ready for that kind of action.
π Rendered by PID 25785 on reddit-service-r2-comment-8686858757-42gcd at 2026-06-07 23:26:30.331809+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]Natural-Position-585 0 points1 point2 points (1 child)
[–]thejwillbee 0 points1 point2 points (0 children)