I have looked for a solution to my problem but the only one I could find was outdated. I know how to put text on the window but it doesn't work for variables. It would be greatly appreciated if someone could provide an example code.
edit: this is what i tried using a variable with
myfont = pygame.font.SysFont('Arial', 30)
textsurface = myfont.render(score, True, (0, 0, 0))
windowSurface.blit(textsurface,(250, 250))
then python me to use a unicode or byte answer