Моника обнови решението на 23.03.2015 16:50 (преди над 9 години)
+def extract_type(*args):
+ text = ''
+ for el in args[0]:
+ if type(el[0]) is args[1]:
+ text = text + str(el[0]) * el[1]
+ return text
+
+
+def reversed_dict(original):
+ reversed = {}
+ for key, el in original.items():
+ reversed[el] = key
+ return reversed
+
+
+# def flatten_dict(original):
+
+
+# def unflatten_dict():
+
+
+def reps(all):
+ only_repeated = []
+ for element in all:
+ if all.count(element) > 1:
+ only_repeated.append(element)
+ return tuple(only_repeated)