Last active
September 18, 2018 23:19
-
-
Save Tanver-Hasan/f6fed4b3174ff15e23f3f9e61c8c04b0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Find character secuences including overlapping matches | |
s = "azcbobobegghakl" | |
p=[i for i in range(len(s)) if s.startswith('bob', i)] | |
print(p); | |
print(len(p)) | |
# Reading list | |
#Recommend Reading | |
# https://docs.python.org/3/tutorial/datastructures.html | |
# https://medium.freecodecamp.org/python-list-comprehensions-vs-generator-expressions-cef70ccb49db | |
# https://docs.python.org/3/howto/functional.html | |
#Advnaced Reading | |
# https://markheath.net/post/python-list-comprehensions-and | |
#https://docs.python.org/3.7/whatsnew/2.0.html#list-comprehensions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment