The solution you already have is correct, and is exactly what I’d want to see if I were reviewing your code. It is as efficient as possible, clear and concise.
The solution you already have is correct, and is exactly what I’d want to see if I were reviewing your code. It is as efficient as possible, clear and concise.