Skip to content

Instantly share code, notes, and snippets.

@YUChoe
Forked from idhunter/sid_rev.py
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YUChoe/23129fc760f061851843 to your computer and use it in GitHub Desktop.
Save YUChoe/23129fc760f061851843 to your computer and use it in GitHub Desktop.
for line in open('a.txt'):
# print line
a_id = line.find("sid:")
a_rev = line.find("rev:")
# print a_id
# print a_rev
print line[a_id+4:a_rev-2]
print line[a_rev+4:-3]
for line in open('b.txt'):
# print line
b_id = line.find("sid:")
b_rev = line.find("rev:")
# print b_id
# print b_rev
print line[b_id+4:b_rev-2]
print line[b_rev+4:-3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment