items = []
items.append("shrooms")
items.append("meth")
items.append("weed")
// FAKE METHOD::
items.amount() // should return 3
How I do it right?
items = []
items.append("shrooms")
items.append("meth")
items.append("weed")
// FAKE METHOD::
items.amount() // should return 3
How I do it right?
The len
function can be used with a lot of types in python - both built-in types and library types.
>>len([1,2,3])
3