如何使Python bot回复列表中的相同数字
例如,我做了这样的代码: etch = [“你好”,“嗨”] 关键字= [“ hi”,“ Hello”] 我该如何制作,以便发送相同的列表号码?例如,Hello在问候列表上是0,所以我会发送HI,因为关键字列表上的0是0?
If for example I did a code like this:
Greet = [“hello”, “hi”]
Keyword = [“hi”, “hello”]
How do I make it so I send the same list number? For example hello would be 0 on the Greet list so I would send hi as it is 0 on the keyword list?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这就是您的想法:
更多的Pythonic是:
或:
This would be what you have in mind:
More pythonic would be:
or: