11
Evan Sherwood
Last seen 4 months ago
Member for 4 years, 4 months, 29 days
Difficulty Normal
I admire the brevity of it. Your return line:
return int(angle) if int(angle) == angle else angle
*Slow Clap*
Brilliant! This is the kind of stuff I need to do a lot more often. What you did in one line took me like 4 lines with two nested 'if' statements to get done.
One question though,
More
I'm really very stupid lol. I just realized I didn't need a whole chunk of what I submitted. Here's what it should have been:
def between_markers(text: str, begin: str, end: str) -> str:
""" returns substring between two given markers """
if begin in text:
tb = text
More
I used almost the same solution, but I like yours slightly better than mine. I did this:
def checkio(data: str) -> bool:
m = re.compile(r"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{10,}$")
if m.match(data) is not None:
return True
else:
More
Damn. Why didn't I think of that? I have to say, I really hate you. Well done. It only took me about 40 lines of code to accomplish the exact same thing, lol. I am disgusted by the fact that this works. Damn you. Good work.
More
WOW YOU'RE RIGHT, EXTREMELY USEFUL. I AM INDEED IMPRESSED.
More
Excellent code! What a genius this guy is, whoever he may be! 10/10 let's hire this guy immediately and pay him 10 times what he's worth! Amazing!!!
More