Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- tab = np.loadtxt('dane.txt')
- print(tab.shape[0]) #ilość rzędów
- print(tab.shape[1]) #ilość kolumn
- length = 1
- maxlength = 1
- for j in range (0, tab.shape[1]):
- for i in range (1, (tab.shape[0])):
- if (tab[i,j] == tab[i-1, j]):
- length = length + 1
- if (length > maxlength):
- maxlength = length
- length = 1
- print(maxlength)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement