8
Микола Кіселюк
Last seen 3 months ago
Member for 5 years, 7 months, 16 days
Difficulty Normal
the best option:
def checkio(array):
return sum(array[::2])*array[-1] if array else 0
More
Yet so:
def find_message(text: str) -> str:
return ''.join(filter(lambda x: x.istitle(), text))
def find_message(text: str) -> str:
return ''.join(([x for x in text if x.istitle()]))
More
One line:
def checkio(data: str) -> bool:
return all((bool(len(data)>9), any(map(lambda x: x.isdigit(), data)), any(map(lambda x: x.islower(), data)), any(map(lambda x: x.isupper(), data))))
More