热门看看列表中是否有一些元素及其位置?
如果我有两个类似的列表:
L1= ["A","B","C","D"]
L2=["A","C"]
我想知道L2元素是否在L1中,它们的位置IE A = [0,0]和C = [0,2]。是否可以?
If i have two lists like these :
L1= ["A","B","C","D"]
L2=["A","C"]
I would like to know if L2 elements are in L1 and their position i.e. A= [0,0] and C=[0,2]. Is it possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
欢迎来到社区!
我认为您的意思是c = [1,2]
这是我的代码:(我希望它的良好并帮助您:))
输出:
Welcome to the community!
I think you meant C=[1,2]
this is my code:(I hope its good and helps you :))
output: