I'm not exactly sure what you want your characters to represent, or where you want X and Y to be located, but something like the following should get you started.
First of all, you want to declare the color: Red = (255, 0, 0)
Then, in your draw loop you want to render the shape with the following code:
x = ShapeProperties["x"]
y = ShapeProperties["y"]
for line in Shape:
for character in line:
if character == "O":
pygame.draw.rect(screen, ShapeProperties["Color"], pygame.Rect(x, y, Size, Size))
x += Size
y += Size
x = ShapeProperties["x"]
It starts at the position you've specified in the properties. It then iterates over the lines in the shape, and then over the characters that denote the actual shape. Each character increments X by the Size
, which you can set to be whatever size you want your shape blocks to be. Once then end of a line is reached, it resets X and increments Y by the size, moving onto the next row.
As an optimization you might want to consider rendering this into a surface of a Shape
class, and just blitting that surface each frame, instead of re-rendering the whole shape, but this should be enough to get you going.