DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python check if item in 2d list
mylist = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]] print(any(6 in sublist for sublist in mylist)) # True
PREVIOUS
NEXT
Tagged:
#python
#check
#item
#list
ADD COMMENT
Topic
COMMENT
Name
5+1 =
Submit