Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def solve_1(obj):
- input_data = list(map(str, obj.split(',')))
- lst1 = list(map(lambda x: list(x), input_data))
- lst1 = ','.join(list(map(lambda x: ','.join(x), lst1)))
- lst2 = '.'.join(list(filter(lambda x: '@' in x, input_data)))
- lst3 = ' '.join(list(map(lambda x: '№' + x + '№', input_data)))
- return [lst1, lst2, lst3]
- def solve_2(x):
- lst = list(map(int, x.split()))
- lst1 = list(filter(lambda x: x % 2 == 0, lst))
- lst2 = list(filter(lambda x: x % 3 == 0, lst))
- lst3 = list(filter(lambda x: x % 2 != 0 and x % 3 != 0, lst))
- lst3 = list(map(lambda x: -x, lst3))
- res = lst1 + lst2 + lst3
- res = list(map(str, res))
- return ' '.join(res)
- class MyStr(str):
- def islower(self):
- return True if len(list(filter(lambda x: x.isupper(), self))) <= 3 else False
- def count(self, value, start=None, end=None):
- my_str = self.lower()
- value = value.lower()
- return my_str.count(value)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement