Lines Matching refs:banana
139 assert.eq("banana"[7::-2], "aaa")
140 assert.eq("banana"[6::-2], "aaa")
141 assert.eq("banana"[5::-2], "aaa")
142 assert.eq("banana"[4::-2], "nnb")
143 assert.eq("banana"[::-1], "ananab")
144 assert.eq("banana"[None:None:-2], "aaa")
145 assert.fails(lambda: "banana"[1.0::], "invalid start index: got float, want int")
146 assert.fails(lambda: "banana"[:"":], "invalid end index: got string, want int")
147 assert.fails(lambda: "banana"[:"":True], "invalid slice step: got bool, want int")
315 assert.eq("banana".count("a"), 3)
316 assert.eq("banana".count("a", 2), 2)
317 assert.eq("banana".count("a", -4, -2), 1)
318 assert.eq("banana".count("a", 1, 4), 2)
319 assert.eq("banana".count("a", 0, -100), 0)
349 assert.eq("banana".replace("a", "o", 1), "bonana")
350 assert.eq("banana".replace("a", "o"), "bonono")