How to paste a code in colors?

Hey all,

When I paste my code, it’s just black. (Indentions are good :slightly_smiling:)
Some people paste their codes with colors… How do you do this here on the forum? (Without doing it by hand of course :wink: )

Sorry for wasting your time!

MatSn0w

Example:

# Write your function below!
def fizz_count(x):
    count = 0
    for item in x:
        if item == "fizz":
            count = count + 1
    return count

Hey… If you put it 3 double quotes around it… Like this

```
Type in here
```

It will come out like this:

# Write your function below!
def fizz_count(x):
    count = 0
    for item in x:
        if item == "fizz":
            count = count + 1
    return count
1 Like

Thanks! This should be an option in the editor :smile:

@matsn0w

It sort of is("</>" button in top of editor), although I don’t think there are colors.
print("hello")
See?
Also, is that how you pasted code in the first post, or did you just did something like you would on a regular text editor?

1 Like

@zainabrawat
That works because of Markdown Syntax.

2 Likes

Yeah, I used the </> button.