Любослава обнови решението на 22.03.2015 19:54 (преди над 9 години)
+def extract_type(input_array, input_type):
+ result = ""
+ for item in input_array:
+ for symbol in item[:-1]:
+ if type(symbol) is input_type:
+ result = result + item[-1] * str(symbol)
+ return result
+
+
+def reversed_dict(dictionary):
+ result = dict()
+ values = []
+ for value in dictionary.values():
+ values.append(value)
+ unique = list(set(values))
+ for item in unique:
+ for key in dictionary:
+ if dictionary[key] == item:
+ result[item] = key
+ return result
+
+
+def reps(input):
+ result = []
+ for item in input:
+ if input.count(item) > 1:
+ result.append(item)
+ return tuple(result)