0
我有一個livewires.games.Text
對象,稱爲分數,我試圖從中獲取值。我試圖將其轉換爲做scores = str(self.scores)
,甚至一個for循環:從livewires.games.Text對象中獲取值
scores = str(self.score)
for item in scores:
print(item)
所有我雖然得到的是<livewires.games.Text object at 0x1017aca58>
我試圖把比分變成一個int()
,這樣我可以用它來根據我正在進行的遊戲進行升級。
有沒有人曾與livewires以前有沒有辦法將<livewires.games.Text object at 0x1017aca58>
變成int()
?