Skip to content

Instantly share code, notes, and snippets.

@ashitaka1963
Created April 24, 2020 12:35
Show Gist options
  • Save ashitaka1963/a06f37e2c9e13277b9f56520ae5699a2 to your computer and use it in GitHub Desktop.
Save ashitaka1963/a06f37e2c9e13277b9f56520ae5699a2 to your computer and use it in GitHub Desktop.
特定文字列の数をカウント
s = "ZABCDBABCQ"
cnt = s.count("ABC")
print(cnt) # 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment