How do you set a pixel's color in python?

Well, how do you set one?
I'm imagining something like

set[0, 0](33,100,100)

break down of the code:

set determines what to do, [x, y] tells the program where the pixel you want to change is, (R, G, B) sets the pixel to the rgb value, set[x, y](R, G, B).

If you're using Turtle you can't do this.
However if you're using OpenCV you can do this:

img[x,y] = (b,g,r)
from PIL import Image"RGBA",(100,100))
for i in range(100):
    a.putpixel((0,0,0,255),(50,i))#does it"woo.png")