Advertisement
Jure199

Untitled

Mar 30th, 2015
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. def nepadajoca(s):
  2.     if len(s) == 0 or len(s) == 1:
  3.         return True
  4.     if s[0] <= s[1]:
  5.         return nepadajoca(s[1:])
  6.     else:
  7.         return False
  8.  
  9. def govorica(pot,znanci):
  10.     for oseba1, oseba2 in zip(pot, pot[1:]):
  11.         if (oseba1, oseba2) not in znanci:
  12.             return False
  13.         else:
  14.             govorica(pot[1:], znanci)
  15.     else:
  16.         return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement