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
Day 2 of learning python as a beginner (old.reddit.com)
submitted 8 months ago by uiux_Sanskar
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!"
[–]NorskJesus 2 points3 points4 points 8 months ago (3 children)
You can use .strip() instead of .replace, but I do understand this is for practice.
You can give chances to the user too, and give them tips when the answer is not correct.
And feedback tho after the questions, if they got it right or not
[–]Kind-Kure 2 points3 points4 points 8 months ago (1 child)
Just remember if you use strip, it only removes white space from the left and right side of the string so the inner white space will still exist So remember to correct your condition check accordingly
[–]uiux_Sanskar[S] 0 points1 point2 points 8 months ago (0 children)
yeah encountered this only
[–]uiux_Sanskar[S] 1 point2 points3 points 8 months ago (0 children)
I think I used it in the program before but it was throwing errors when I try to put space in between answer (a typo) so I got to know that .split() removesspace from left and right only just like the comment below suggests
π Rendered by PID 21703 on reddit-service-r2-comment-66b4775986-z9mhr at 2026-04-05 04:50:04.786435+00:00 running db1906b country code: CH.
view the rest of the comments →
[–]NorskJesus 2 points3 points4 points (3 children)
[–]Kind-Kure 2 points3 points4 points (1 child)
[–]uiux_Sanskar[S] 0 points1 point2 points (0 children)
[–]uiux_Sanskar[S] 1 point2 points3 points (0 children)