Recently, I've been tinkering around with pygame. I noticed that even if I've imported pygame, I can still import pygame.local and pygame.sprite (from... import... to reduce the words I need to type in later). What are the relationships between pygame and pygame.SOMETHING? I thought it was just one pygame module, and now I'm a bit confused. Please give me an explanation or direct me to some articles.
Any help would be appreciated!
Think of pygame like a library or archive on how to make GUIs in python. You can get a specific book, such as one on how to make sprites, from the library. It is still part of the library, and whether you read it while sitting in the library or after checking it out, it will have the same content.
You can do from pygame import sprite to use sprite() as a shorthand for pygame.sprite() in your code and it will function the same overall.
difference between pygame and pygame.SOMETHING