Yes, you can run python code from swift by using the PythonKit , a framework based on the Python module from the Swift for TensorFlow project. It’s important to note that Python is not available on iOS.24 Ağu 2020
Read moreCan you run Python in an iOS app?
With regards your technical question, iOS does not include a built-in Python interpreter. If you want to run Python scripts, you’ll have to build a Python interpreter into your app .
Read more