Create a gist now

Instantly share code, notes, and snippets.

with open("tyc_main.dat", mode="rt") as tycho_database:
num_close = 0
for line in tycho_database:
plx = line[79:86].strip()
if line[267] != 'P' and plx and float(plx) > 200 and line[349] != 'K' and int(line[260]) <= 4:
num_close += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment