r/learnpython • • Mar 27 '23

Actually using a tuple

Can someone, please, give me a "real-world" example on the use of a tuple? I'm learning through w3schools. The idea of a tuple sort of makes sense, but I have no idea how it would/could be applied.

147 Upvotes

64 comments sorted by

View all comments

3

u/KOALAS2648 Mar 27 '23

When using the “pygame” module you have to type:

pygame.display.set_mode((500,500))

2

u/MrsCastle Mar 27 '23

Also in PyGame I used it for RGB color (red, blue, green) assignments