python - Strange test-case result in CodeWars Kata -


i need solving codewars kata i'm kind of stuck with. reason receiving false in 1 of test-cases , can't find real reason behind it.

the instructions validate string(ping). requirements string needs have length of 4 or 6 , can consist of digits.

this code:

def validate_pin(pin):       if (len(pin) != 4 or len(pin) != 6):         return false     print(pin.isdigit())     if(pin.isdigit()):         return true     else:         return false 

it passes 9/10 tests. input / output failed test:

i recieve false on validate_pin('1234'):

wrong output '1234': false should equal true

if (len(pin) != 4 , len(pin) != 6): 

Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -