以下脚本不可执行。做了一些搜索,我认为没有任何错误。
for i in range(1, length):
itchat.send("జ్ఞా", toUserName=friends[i]['UserName'])
print(f'检测到第{i}位好友: {str(friends[i]["NickName"]).center(20, " ")}')
答案 0 :(得分:1)
尝试:
for i in range(1, length):
itchat.send("జ్ఞా", toUserName=friends[i]['UserName'])
print('检测到第{}位好友: {}'.format(i, str(friends[i]["NickName"]).center(20, " ")))