We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
defminimumNumber(n,password):# Return the minimum number of characters to make the password strongminLength=6patterns=[r'[0-9]',r'[a-z]',r'[A-Z]',r'[!@#$%^&\*\(\)\-\+]']total_chars=sum([1forpatterninpatternsifnotre.search(pattern,password)])total_chars+=(0ifminLength<=n+total_charselseminLength-n-total_chars)returntotal_chars
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
CamelCase
You are viewing a single comment's thread. Return to all comments →