f = open("home/pi/Documents/NGC.csv") for x in f: if "NGC3200" in x: print(x)