min_len = min(len(s) for s in input_list) for i inrange(min_len): current_char = input_list[0][i] ifall(s[i] == current_char for s in input_list): continue else: print(input_list[0][:i]) return"" solution = Solution() shuzu = solution.getshuzu() qianzhui = solution.findqianzhui(shuzu)
有效的括号
给定一个只包括 '(',')','{','}','[',']' 的字符串 s ,判断字符串是否有效。