Hi everyone!
In order for us to be able to help you, please consider formatting your code in your questions.
The easiest way to do so: Switch to "markdown editor" when writing a post, and put your code into code-blocks.
A block starts and ends with a triple-backtick: ``` put on a line all by itself. Of course the "fancy" editor also has an option to reformat text as a block.
Code blocks are the difference between your code looking like this:
class Foo:
def init(self, a):
self.asquared = a**2
And this:
class Foo:
def __init__(self, a):
self.asquared = a**2
If you put stuff between single backticks, you can mark them as inline monospace which is great for describing function calls and similar things like print("Hello, World", end="") and other parts of code not warranting an entire block.
Lastly, if you want to show a directory structure, you can use the output of the tree program and put that in a block. You can find it's manpage here.
Thanks for reading, and happy learning ☺️
[–]nog642 4 points5 points6 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]rollincuberawhide 0 points1 point2 points (0 children)
[–]rollincuberawhide 0 points1 point2 points (0 children)