使用C++运行python代码
#include <pybind11/pybind11.h>
#include <pybind11/embed.h>
#include <iostream>
namespace py = pybind11;
int main() {
py::scoped_interpreter guard{
}; // 开启 Python 解释器
py::object result = py::eval("1 + 2");
py::object pyls = py::eval("[i for i in range(10)]"<