Category Archives: python

Check for duplicate characters : Python

def hasDuplicate(str_var): “”” Checks for repeated characters Author: http://www.victorbyte.net returns Boolean value “”” for i in range (0, len(str_var)): for j in range( i + 1, len(str_var)): if str_var[i].lower() == str_var[j].lower(): return True; return False;

Posted in algorithms, python | 3 Comments