Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

python codewars

Language: Layout:
+ ] Show input
Absolute running time: 0.13 sec, cpu time: 0.09 sec, memory peak: 6 Mb, absolute service time: 0,14 sec 
latest |  history
# ------------------ #
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