+ 1
Please explain how 0 is the output?
a = [23,11,18,75,99] p= ages.count(99)-ages.count(11) print(p)
2 ответов
+ 2
count() function returns the number of instances of the passed argument in the given list.
Ex : ages. count (99), returns number of 99 in the list named ages...
+ 1
a.count(99) == 1
There is 1 int with the value 99
a.count(11) == 1
There is 1 int with value 11
p = 1 - 1
p = 0