How to realize the search in JZ1 two-dimensional array
The content of this article mainly focuses on how to realize the search in the JZ1 two-dimensional array. The content of the article is clear and clear. It is very suitable for beginners to learn and is worth reading. Interested friends can follow the editor to read together. I hope you can get something through this article!
Search questions in a two-dimensional array
In a two-dimensional array (each one-dimensional array is the same length), each row is sorted from left to right, and each column is sorted from top to bottom. Please complete a function and enter such a two-dimensional array and an integer to determine whether the array contains the integer.
Code target = 8array = [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12],] for i in array: if target in i: print ('true') break thank you for your reading. I believe you have some understanding of the problem of "how to find in the JZ1 two-dimensional array". Go and practice, if you want to know more about it. You can follow the website! The editor will continue to bring you better articles!