Using a simple "if "blank" in string" statement i would like to find an exact word in a csv column.
with open("example.csv","r") as file
reader=csv.reader(file)
string=""
for row in reader:
if "Hello" in row[0]:
string+=row[0]
print(string)
If the csv has "Hello World"
in row[0] string will equal "Hello World" but I only want string to +=row[0]
if specifically only "Hello" is in row[0] without "World".
In conclusion, I'm hoping the code prints nothing unless exactly "Hello" is in row[0].