14
Григорий Семикин
Last seen 1 year ago
Member for 7 years, 1 month, 12 days
Difficulty Easy
The first if condition is extra here. Your solution will work fine without it
More
I used **a[0],a[1],a[2]**, but usage * its more "pythonic" code-style.
I would keep it in mind for futher tasks.
More
I'm looking for this solution and understanding how much I have to learn. Cool! Thanks
More
I see ;)
I coped with this task via:
numpy.prod([int(num) for num in str(number) if num != "0"])
But your solution is better! At least, you don't need import numpy package
GG!
More
Hi! Regex is POWER! :)
By the way, line 12 seems redandant
More
Construction like:
datetime.date(a[0], a[1], a[2])
could be shortened to:
datetime.date(*a)
Also you coud get rid of .date via importing only **date **note hole **datetime** package. I mean:
from datetime import date
More
each if condition has replace white spaces. The task description says:
**_If the string is empty or doesn't have any letter in it - function should return True._** So, I would suggest to add any upper case letter and check text by isupper():
text+="A"
return text.isupper()
More