'enter' missed while rendering text in pygame code example
Example: pygame render text
"""system font"""
font = pygame.font.SysFont("Segoe UI", 35)
"""font from .ttf file"""
font = pygame.font.Font("path/to/font.ttf", 35)
textsurface = font.render("text", False, color) # "text", antialias, color
surface.blit(textsurface, (x, y))