You're viewing a single thread.
View all comments
127
comments
"strawberry".split('').filter(c => c === 'r').length
11 0 Replylen([c if c == 'r' for c in "strawberry"])
9 0 Replyimport re; r = [c for c in re.findall("r", "strawberry")]; r = "".join(r); len(r)
1 1 Reply
'strawberry'.match(/r/ig).length
6 0 Reply(\r (frequencies "strawberry"))
2 0 ReplyAre you implying that it's running a function on the word and then giving a length value for a zero indexed array?
1 2 ReplyA zero indexed array doesn't have a different length ;)
2 0 Reply
You've viewed 127 comments.
Scroll to top