Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What kind of Python assignment is this called?

I saw this in a Pygame tutorial:

size = width, height = 600,400
screen = pygame.display.set_mode(size)

I understand width, height being set to 600, 400 respectively, but what is size? That's one variable. Thanks.

like image 700
johnny Avatar asked Feb 24 '26 06:02

johnny


1 Answers

size is assigned the tuple (600,400).

>>> size = width, height = 600,400
>>> size
(600, 400)
>>> width
600
>>> height
400
like image 176
Amit Verma Avatar answered Feb 26 '26 19:02

Amit Verma