Advertisement
T-D-K

Untitled

Jun 29th, 2018
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. a = [
  2.     [1.1, 2, 3, 4],
  3.     [2, 2, 2, 2],
  4.     [2, 3, 2, 3],
  5.     [3, 4, 4, 3],
  6.     [1, 1, 1, 2],
  7.     [3, 1, 2, 3]
  8. ]
  9. for r in a:
  10.     s1 = set(r)
  11.     for i in range(len(r)):
  12.         j = i + len(s1)
  13.         s2 = set(r[i:j])
  14.         if (s1 == s2):
  15.             print("From " + str(i) + " to " + str(j))
  16.             break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement