generate functionTue, 21 Mar 2023

the program finds the number of all repeated characters without case in the string and generates a list

def repeat_letters(s): res = [] for i in s: if i.lower() in s.lower() and i.lower() not in res: res.append(i.lower()) return res

Questions about programming?Chat with your personal AI assistant