Run Code | API | Code Wall | Misc | Feedback | Login | Theme | Privacy | Patreon |
python codewars# ------------------ # Count the unique duplicates 0 # ------------------ # Make a program that filters a list of strings and returns a list with only your friends name in it. If a name has exactly 4 letters in it, you can be sure that it has to be a friend of yours! Otherwise, you can be sure he's not... Ex: Input = ["Ryan", "Kieran", "Jason", "Yous"], Output = ["Ryan", "Yous"] Note: keep the original order of the names in the output ['Ryan', 'Yous'] # ------------------ # Given a set of numbers, return the additive inverse of each. Each positive becomes negatives, and the negatives become positives. invert([1,2,3,4,5]) == [-1,-2,-3,-4,-5] invert([1,-2,3,-4,5]) == [-1,2,-3,4,-5] invert([]) == [] [-1, 2, -3, 4, -5] |
λ
.NET NoSQL database for rapid development
|