Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def koreni(lists):
- out = []
- for list in lists:
- first_letter = list[0][0].lower()
- correct = True
- for s in list:
- if len(s) > 0 and s[0].lower() == first_letter:
- continue
- correct = False
- if correct: out.append(list)
- return out
- print(koreni([['bavto', 'Bcbeceda'],['avto', 'abeceda', ''],['td', 'ts']]))
Add Comment
Please, Sign In to add comment