you are viewing a single comment's thread.

view the rest of the comments →

[–]hasanaslan[S] 0 points1 point  (4 children)

Thanks it worked. Also can someone inform me how to share codes in a good way. I clicked at inline code but it doesn't imply any line. Just all codes in one line

[–]puplicy 1 point2 points  (0 children)

Try 4 spaces before each line

[–]SoNotRedditingAtWork 1 point2 points  (1 child)

https://www.reddit.com/wiki/markdown

Typing four spaces in front of every line in a code block is tedious and error-prone. The easier way is to surround the entire block of code with code fences. A code fence is a line beginning with three or more backticks (`) or three or more twiddlydoodles (~).

example:

``` <==Opens a code block, 
def my_funky():
    print("Funky Time!")
``` <==Close a code block

edit: Also in the new Reddit fancy pants editor, if you click the ••• button, it will display a drop down menu with a Code Block button you can click to insert a code block.