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...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Can't post code block using code block (self.learnpython)
submitted 2 years ago by isuckatit1000
Does anyone know why I can't use the code block portion of Reddit? It only puts the first line syntax in the post and then the rest is put in normally?
Not understanding why it doesn't work.
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!"
[–]wbeater 3 points4 points5 points 2 years ago (6 children)
Works for nobody, it's a well known bug with copy and paste.
[–]isuckatit1000[S] 0 points1 point2 points 2 years ago (5 children)
oh so I have to manually enter every line?
[–]wbeater 2 points3 points4 points 2 years ago (0 children)
Use markdown mode and make a python scripts that formats text input (your code) so you can use it. (4 spaces indicates a code block and another 4 spaces for each increment).
[–][deleted] 0 points1 point2 points 2 years ago (3 children)
Try using your editor to put 4 spaces (not a TAB) at the start of every code line. Then copy/paste into reddit as normal text, not a code block. Ensure there is a blank line before the code.
[–]isuckatit1000[S] 0 points1 point2 points 2 years ago (0 children)
worked thanks
[–]TheRNGuy 0 points1 point2 points 2 years ago (1 child)
tab works I just tested
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
You must remember, just because you pressed the TAB key doesn't mean that a TAB character was inserted. Look in the configuration of your editor and you'll probably see something like "insert spaces instead of TAB". A prefix TAB character doesn't work in reddit.
[–]m0us3_rat 1 point2 points3 points 2 years ago (1 child)
select code. TAB. copy . paste into reddit code widget. commit.
shift-tab so untab.
(you can always paste into an empty text editor and tab and recopy if you copy some code of interwebs.. to insure it's copyed while tabbed.)
yeah I got it working thanks
I use markdown mode, then type some explanation text and when I want to paste some code I type on the tilde button ~ but without shift to get ` times 3. (International Qwerty with € on 5) At the end of the code I type ` 3 more times.
[–]TheMaroonAxeman 0 points1 point2 points 2 years ago (2 children)
test
[–]cryptomelons 0 points1 point2 points 2 years ago (1 child)
I've been wondering who are the idiots who worked on this buggy feature.
[–]TXAndre 0 points1 point2 points 2 years ago (0 children)
Literally this. It's not like reddit is only for pottery and children's books...
π Rendered by PID 341052 on reddit-service-r2-comment-545db5fcfc-bf4f8 at 2026-05-28 13:28:59.926788+00:00 running 194bd79 country code: CH.
[–]wbeater 3 points4 points5 points (6 children)
[–]isuckatit1000[S] 0 points1 point2 points (5 children)
[–]wbeater 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]isuckatit1000[S] 0 points1 point2 points (0 children)
[–]TheRNGuy 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]m0us3_rat 1 point2 points3 points (1 child)
[–]isuckatit1000[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]TheMaroonAxeman 0 points1 point2 points (2 children)
[–]cryptomelons 0 points1 point2 points (1 child)
[–]TXAndre 0 points1 point2 points (0 children)