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:
Thank you...[/i][/i]
1 2 3 4 5 6 |
[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] |