display text in pygame

font = pygame.font.SysFont(None, 24)
img = font.render('hello', True, BLUE)
screen.blit(img, (20, 20))

Here is what the above code is Doing:
1. First, we create a pygame.font.SysFont object. This object represents a system font.
2. Then, we create a pygame.Surface object by calling the render() method of the font object.
3. This Surface contains the text we want to draw on the screen.
4. Finally, we call the blit() method of the screen object to draw the text Surface on the screen.