Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Python :: python server http one line 
Python :: display selective fields in admin page django 
Python :: python generate table 
Python :: python flatten dict 
Python :: column standardization pandas 
Python :: sort_values 
Python :: opencv grayscale to rgb 
Python :: get active window title python 
Python :: r2 score sklearn 
Python :: python console animation 
Python :: making spark session 
Python :: get current month python 
Python :: how to read pdf in python 
Python :: how to make a python program to count from 1 to 100 
Python :: seaborn hue order 
Python :: how to align text in tkinter 
Python :: how to plot two columns graphs in python 
Python :: text to speech python 
Python :: how to pass header in requests 
Python :: python datetime yesterday 
Python :: pandas reciprocal 
Python :: formula for compounding interest in python 
Python :: beautiful soup 4 python 
Python :: python flask replit 
Python :: python get list of files in path 
Python :: how to click in selenium 
Python :: python os get output 
Python :: python for looop array value and index 
Python :: python plot two lines on same graph 
Python :: python date get day 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =