mirror of
https://github.com/micropython/micropython.git
synced 2026-01-08 13:10:21 +01:00
Factor out mp_seq_count_obj() and implement tuple.count().
This commit is contained in:
5
tests/basics/tuple_count.py
Normal file
5
tests/basics/tuple_count.py
Normal file
@@ -0,0 +1,5 @@
|
||||
a = (1, 2, 3)
|
||||
a = a + a + a
|
||||
b = (0, 0, a, 0, a, 0)
|
||||
print(a.count(2))
|
||||
print(b.count(a))
|
||||
Reference in New Issue
Block a user