15
Vinh Quang Nguyễn
Last seen 1 year ago
Member for 1 year, 6 months, 19 days
Difficulty Easy
I like "elif stack:" part. I always check len(stack) in situations like this
More
your code is very clear and easy to understand, i learned a lot from it
More
"return -1 if n > len(array) - 1 " is easier to understand than "len(array) < n + 1"
More
Absolutely beautiful, and amazingly clear, loved this solution!
After reading this, I felt I was really limited by my own imagination. Brilliant!
More
The comparison operator ">=" already returns a Boolean value, so there is no need to convert the result with the "bool" keyword. You can remove this keyword and the result is still correct like this:
acceptable_length = 7
def is_acceptable_password(password: str) -> bool:
return len
More
I think your code will look better if written like this.
def is_acceptable_password(password: str) -> bool:
return len(password)>6
It is not necessary to declare additional variable _correct_length_
More