Lines Matching refs:banana
2117 "a" in "banana" # True
2359 "banana".count("a") # 3
2360 "banana".reverse() # error: string has no .reverse field or method
2369 f = "banana".count
2458 "banana"[1::2] # "aaa" (select alternate elements starting at index 1)
2459 "banana"[4::-2] # "nnb" (select alternate elements in reverse, starting at index 4)
3149 getattr("banana", "split")("a") # ["b", "n", "n", ""], equivalent to "banana".split("a")
3450 occurrences of a substring; `"banana".count("a")` yields `3`.
3653 x = list("banana".codepoints())
4033 "banana".replace("a", "o") # "bonono"
4034 "banana".replace("a", "o", 2) # "bonona"
4080 "banana".rsplit("n") # ["ba", "a", "a"]
4081 "banana".rsplit("n", 1) # ["bana", "a"]
4123 "banana".split("n") # ["ba", "a", "a"]
4124 "banana".split("n", 1) # ["ba", "ana"]