获得列表Elemnt的特定部分
我有此列表[c1 = 2*3,c2 = 5*1,c3 = 1*1]
,我想创建一个新列表,只有列表的每个元素的第三元素,因此,像这样的东西[2,5,1]
。我正在使用NTH0访问列表的每个元素,但是从那里我无法进一步进步。先感谢您。
I have this list [c1=2*3,c2=5*1,c3=1*1]
and i want to create a new list with just the 3rd element of each element of the list, so something like this [2,5,1]
. I'm using nth0 to access each of the elements of the list but from there i can't progress much further. Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从您的示例中,我假设列表由表单
(a = b * c)的元素组成他们。在这种情况下,可能的解决方案如下:
示例:
From your example, I assume that the list is composed by elements of the form
(A = B * C)
and that you want to filter only the componentB
of each one of them. In this case, a possible solution is as follows:Example: