Double Two or Three

With very short lists, it is often easier to check the needed values directly instead of building a complex algorithm. Write a function double23 that takes a list nums containing 0, 1, or 2 numbers. Return True if the list contains exactly two 2 values or exactly two 3 values; otherwise, return False.

Примеры

Ввод
[2, 2]
Вывод
True
Ввод
[3, 3]
Вывод
True
Ввод
[2, 3]
Вывод
False

Нужно реализовать

def double23(nums: list[int]) -> bool:

Теги

listsarray
PostgreSQLv16

Šeit parādīsies koda izpildes rezultāts

Visible tests
1
Input
[2,2]
ExpectedTrue
2
Input
[3,3]
ExpectedTrue
3
Input
[2,3]
ExpectedFalse
4
Input
[2]
ExpectedFalse
5
Input
[]
ExpectedFalse
6
Input
[3,4]
ExpectedFalse
Focus radio
Paused · SomaFM · Fluid