摘要:
代码: def long_num(str): max_list = [] for i in range(len(str)): new_list = [] for j in range(i+1,len(str)): if str[j].isdigit(): new_list.append(str[j] 阅读全文
摘要:
代码: def count_number(target_str): d = {} for i in target_str: if i in d: d[i] += 1 else: d[i] = 1 return d 测试: s = "jgiwejgiwiwrijhiwrihowWrohwrih" pr 阅读全文
摘要:
获取字符串中全部的回文子串 代码: def get_all_Palindrome(item:str): ''' 获取所有的回文字符串 ''' #定义列表,存放所有的回文字符串 res = [] for i in range(len(item)): for j in range(i + 1, len( 阅读全文
摘要:
用的地方不一样 where可以用于select、update、delete和insert into values(select * from table where ..)语句中。 having只能用于select语句中 执行的顺序不一样 where的搜索条件是在执行语句进行分组之前应用 havin 阅读全文