Created
July 11, 2017 13:47
-
-
Save MSeifert04/5c35af67aea9bd64df0bbe79d6104301 to your computer and use it in GitHub Desktop.
This file contains 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
thing = """1 ID:K-95 list of data | |
0 ID:D-56 list of other data""" | |
idtag = "K-95" | |
for line in thing.split('\n'): | |
if line.startswith('1') and line.startswith(idtag, 5, 5+4): | |
print(line) | |
# prints | |
# 1 ID:K-95 list of data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment