【发布时间】:2021-07-31 01:05:18
【问题描述】:
我正在尝试查找 List_00 或 List_01 的元素,它们都在名为 combine_list 的单个列表中。我怎样才能找到它?
#consists intergers
list_00 = [1, 2, 33, 100, 69]
#consists strings
list_01 = ['Jack', "Sam", "Trump"]
#both list combined in a single list to perform other experimental operations
combined_list = [list_00 , list_01]
#desired output: any single item of any of the above list
【问题讨论】:
-
“所需的输出:任何单个项目...”:
combined_list[0][0]。如果这不是您期望的输出,请提供您期望的输出。 -
这能回答你的问题吗? common elements in two lists python
-
我想要 1 或 Jack 或两个列表中的任何一个中的任何其他元素作为输出
-
@trincot 你的答案是正确的,非常感谢
标签: python-3.x