I've seen problems similar to mine and I found the solution, however my problem is a little complex. I want to find a specific string in the list. This my list:
List = ['JFK,John F Kennedy International,5326,5486', 'ORY,Paris-Orly,629,379', 'MAD,Adolfo Suarez Madrid-Barajas,1428,1151', 'AMS,Amsterdam Schiphol,526,489', 'CAI,Cairo International,3779,3584']
I want to be able to find 'JFK' or 'ORY' or 'MAD' or 'AMS' or 'CAI' or anything.
If you want to split the list that's also fine.
However then I would also like to be able to print that whole line where the three letter code came from. For example, if the the three letters found is 'AMS', I would later like to print 'CAI,Cairo International,3779,3584'
I my friend, I hope you are well.