numpy.core.defchararray.find(arr, substring, start=0, end=None): Finds the lowest index of the sub-string in the specified range.
arr : array-like or string to be searched.
substring : substring to search for.
start, end : [int, optional] Range to search in.
Returns : An integer array with the lowest index of found sub-string.
arr : ['vdsdsttetteteAAAa', 'AAAAAAAaattttds', 'AAaaxxxxtt', 'AAaaXDSDdscz'] find of 'tt' [ 5 9 8 -1] find of 'tt' [ 5 9 8 -1] find of 'tt' [ 8 9 8 -1]
find of 'Aa' [15 6 1 1] find of 'Aa' [15 -1 -1 -1]
- Important differences between Python 2.x and Python 3.x with examples
- Python | Set 4 (Dictionary, Keywords in Python)
- Python | Sort Python Dictionaries by Key or Value
- pow() in Python
- SHA in Python
- gcd() in Python
- Use of min() and max() in Python
- chr() in Python
- Any & All in Python
- Python Set | pop()
- abs() in Python
- zip() in Python
- try and except in Python
- set add() in python
- SQL using Python | Set 1
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.