To call a function from a smart contract using Python, you can use the tonsdk package available on PyPI.
This package provides a convenient way to interact with TON smart contracts using Python.
You can find more information and installation instructions on the package's official PyPI page: https://pypi.org/project/tonsdk/