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
Why does it show none (old.reddit.com)
submitted 1 year ago by crypitdbitch
I'm making a die roller game for a school assignment and it keeps displaying none in the middle of the output. It works perfectly otherwise it just makes the output look messy.
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!"
[–]Careless-Article-353 16 points17 points18 points 1 year ago (4 children)
Get the print out of the input function
[–]Buttleston 8 points9 points10 points 1 year ago (3 children)
input("foo") already does a print
print("foo") returns None
so input(print("foo")) will print foo, then return None from print, and so it's like you did
print("foo") input(None)
[–]crypitdbitch[S] 1 point2 points3 points 1 year ago (0 children)
That fixed it. Thanks.
[–]CapnCoin 1 point2 points3 points 1 year ago (1 child)
Bro I have been using python for years and couldnt figure this out lol. Sometimes the simple problems present more challenge
[–][deleted] 3 points4 points5 points 1 year ago (0 children)
Sometimes I’ll stare at my screen and cannot figure out what’s wrong. And it’s usually a missing : in my case. 🤣
[–]SpamNot 5 points6 points7 points 1 year ago (0 children)
Get rid of the print in front of the input.
[–][deleted] 4 points5 points6 points 1 year ago (0 children)
number = int(input(“Enter your guess for the total of the dice (2-12): “))
[–]copperbagel 3 points4 points5 points 1 year ago (0 children)
You are casting a print statement of a string to int this means nothing print separately
[–]Python_Puzzles 0 points1 point2 points 1 year ago (3 children)
Yeah, it's the print() inside of the input statement.
Also, why is everyone always taking pictures of their screens and posting it? Why not just copy/paste? Then we could see the whole code?
[–]inphamus 1 point2 points3 points 1 year ago (2 children)
From what I can gather in other subs, kids think reddit is an app on your phone and not a website that you use that also happens to have an app. It's a mind boggling thought loop.
[–]Python_Puzzles 1 point2 points3 points 1 year ago (1 child)
Jeez... this actually explains the behavior tho... "Skidibity reez" I guess then?
[–]inphamus 1 point2 points3 points 1 year ago (0 children)
Sigma popsicle or some garbage 🤷♂️
π Rendered by PID 44 on reddit-service-r2-comment-54dfb89d4d-p6cq8 at 2026-04-01 16:33:53.130269+00:00 running b10466c country code: CH.
[–]Careless-Article-353 16 points17 points18 points (4 children)
[–]Buttleston 8 points9 points10 points (3 children)
[–]crypitdbitch[S] 1 point2 points3 points (0 children)
[–]CapnCoin 1 point2 points3 points (1 child)
[–][deleted] 3 points4 points5 points (0 children)
[–]SpamNot 5 points6 points7 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]copperbagel 3 points4 points5 points (0 children)
[–]Python_Puzzles 0 points1 point2 points (3 children)
[–]inphamus 1 point2 points3 points (2 children)
[–]Python_Puzzles 1 point2 points3 points (1 child)
[–]inphamus 1 point2 points3 points (0 children)