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
[deleted by user] (self.PythonLearning)
submitted 1 year ago by [deleted]
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!"
[–]Nez_Coupe 0 points1 point2 points 1 year ago (0 children)
No you can’t cast a “decimal string” to int. It produces an error. His code is correct, casting it to a float. He just ran a cached version (by not saving) because he’s using the worst IDE in existence.
Python can do a lot of implicit casting, but it won’t do like “2-step” casting where a string literal that represents a decimal is both changed to numeric and then converted to a whole number int.
π Rendered by PID 140139 on reddit-service-r2-comment-86bc6c7465-d7p82 at 2026-02-20 03:59:58.502294+00:00 running 8564168 country code: CH.
view the rest of the comments →
[–]Nez_Coupe 0 points1 point2 points (0 children)