Advertisement
morimoto_ltd

Exam

Sep 20th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. def repeat_counter(input):
  2.     for i in range(len(input)):
  3.         if isinstance(input[i], str):
  4.             input[i] = input[i].lower()
  5.     counter = list( dict.fromkeys(input) )
  6.     if ( len(input) - len(counter) + 1 ) % 2 == 0:
  7.         return True
  8.     return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement