Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def nepadajoca(s):
- if len(s) == 0 or len(s) == 1:
- return True
- if s[0] <= s[1]:
- return nepadajoca(s[1:])
- else:
- return False
- def govorica(pot,znanci):
- for oseba1, oseba2 in zip(pot, pot[1:]):
- if (oseba1, oseba2) not in znanci:
- return False
- else:
- govorica(pot[1:], znanci)
- else:
- return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement