Python Forum

Full Version: Help with BBCode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My apologies if this question isn't formatted correctly, but I'm trying to get BBCode straightened out. I'm trying to insert my code between the python tags but when I preview it, it is altered and hard to read. How do I insert it so it is easy for every one here to read? I've looked over the BBCode link but it wasn't helpful.  [color=#0000ff]When I copy/paste the code from pycharm it becomes this on the forum:


[color=#000080]def [/color]sieve(n=[color=#0000ff]1000000[/color]):
multiples = [color=#000080]set[/color]()
primes = [[color=#0000ff]2[/color]]
[color=#000080]for [/color]i [color=#000080]in [/color][color=#000080]range[/color]([color=#0000ff]3[/color], n, [color=#0000ff]2[/color]):
[color=#000080]if [/color]i [color=#000080]not in [/color]multiples:
[i][i]
Thank you...[/i][/i]
When you post the code, use crtl-shift-v (on original copy)
this will remove any formatting.
Ctrl+Shif+v is the advisable way as posed bye @Larz60+

There also a Remove Formatting button if you look on menu of editor.
If i just cope a line from your post.

Before:
When I copy/paste the code from pycharm it becomes this on the forum:

After mark line and push Remove Formatting button:
When I copy/paste the code from pycharm it becomes this on the forum: