擅长:python、mysql、java
<p>您的代码将<code>test</code>映射到<code>twittercontent_pb2.TwitterContentRequest</code>列表中</p>
<p>你可以用<code>print(len(sendMsg(test)))</code>来证明这一点,它应该返回2</p>
<p>然而,这就是你所做的一切</p>
<p>您写下希望“将它们写入服务”,但您的问题包含的此服务的详细信息不足以提供答案</p>
<p>如果该服务是gRPC服务(这些服务使用protobuf消息),则您需要创建gRPC客户端并使用该客户端将您的消息提交到该服务</p>
<p>见:gRPC<a href="https://grpc.io/docs/languages/python/basics/" rel="nofollow noreferrer">Basic Tutorial for Python</a></p>