Я делаю игру в pygame для моей сестры, чтобы практиковаться в pygame, и я пытаюсь добавить случайную строку из текстового файла в имя окна:
импортировать pygame, random, sys
RandomMess = open('GameText.txt')
pygame.display.set_caption('Dream Land: {}').
#The .txt file currently has 4 lines but will be a lot more in the future...
#These are the test lines: This is in beta, hi :), hello, hi
У меня есть весь остальной код на случай, если кто-то скажет, что я не делал другого кода для создания окна или чего-то еще. Я хочу, чтобы он сказал: Страна грез: {} затем в фигурных скобках добавьте случайную строку из файла.