Find row number for specific change in python numpy

This is one possible solution, but it’s not using Numpy

f = open('yourfile.txt', 'r')
x = 0
for i in f:
   x = x + 1
   if i == 'B':
      print('row' + str(x))
   

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top