Python Pythonの%と//の関係 Pythonの%は割り算のあまり、//は割り算の結果の整数部分になります。 例えば「5割る3」は「1.777」または「1あまり2」なので 5 % 3 == 2 5 // 3 == 1 となります。 2023.12.30 Python