pip install pythonnet python import clr clr.AddReference('System') python import clr clr.AddReference('System') from System import String str_obj = String('Hello from .NET!') py_str = str(str_obj) print(py_str)