Here are the data needed for the program.
SanFrancisco.csv
station_id,name,lat,long,dockcount,landmark,installation
41,Clay at Battery,37.795001,-122.39997,15,San Francisco,8/19/2013
42,Davis at Jackson,37.79728,-122.398436,15,San Francisco,8/19/2013
45,Commercial at Montgomery,37.794231,-122.402923,15,San Francisco,8/19/2013
46,Washington at Kearney,37.795425,-122.404767,15,San Francisco,8/19/2013
47,Post at Kearney,37.788975,-122.403452,19,San Francisco,8/19/2013
48,Embarcadero at Vallejo,37.799953,-122.398525,15,San Francisco,8/19/2013
49,Spear at Folsom,37.790302,-122.390637,19,San Francisco,8/20/2013
50,Harry Bridges Plaza (Ferry Building),37.795392,-122.394203,23,San Francisco,8/20/2013
SanJose.csv
station_id,name,lat,long,dockcount,landmark,installation
2,San Jose Diridon Caltrain Station,37.329732,-121.901782,27,San Jose,8/6/2013
3,San Jose Civic Center,37.330698,-121.888979,15,San Jose,8/5/2013
4,Santa Clara at Almaden,37.333988,-121.894902,11,San Jose,8/6/2013
5,Adobe on Almaden,37.331415,-121.8932,19,San Jose,8/5/2013
6,San Pedro Square,37.336721,-121.894074,15,San Jose,8/7/2013
7,Paseo de San Antonio,37.333798,-121.886943,15,San Jose,8/7/2013
8,San Salvador at 1st,37.330165,-121.885831,15,San Jose,8/5/2013
9,Japantown,37.348742,-121.894715,15,San Jose,8/5/2013
10,San Jose City Hall,37.337391,-121.886995,15,San Jose,8/6/2013
11,MLK Library,37.335885,-121.88566,19,San Jose,8/6/2013
12,SJSU 4th at San Carlos,37.332808,-121.883891,19,San Jose,8/7/2013
13,St James Park,37.339301,-121.889937,15,San Jose,8/6/2013
14,Arena Green / SAP Center,37.332692,-121.900084,19,San Jose,8/5/2013
16,SJSU - San Salvador at 9th,37.333955,-121.877349,15,San Jose,8/7/2013
80,Santa Clara County Civic Center,37.352601,-121.905733,15,San Jose,12/31/2013
84,Ryland Park,37.342725,-121.895617,15,San Jose,4/9/2014
trips_20150831.csv
Trip ID,Duration,Start Date,Start Station,Start Terminal,End Date,End Station,End Terminal,Bike #,Subscriber Type,Zip Code
913460,765,8/31/2015 23:26,Harry Bridges Plaza (Ferry Building),50,8/31/2015 23:39,San Francisco Caltrain (Townsend at 4th),70,288,Subscriber,2139
913459,1036,8/31/2015 23:11,San Antonio Shopping Center,31,8/31/2015 23:28,Mountain View City Hall,27,35,Subscriber,95032
913455,307,8/31/2015 23:13,Post at Kearny,47,8/31/2015 23:18,2nd at South Park,64,468,Subscriber,94107
913454,409,8/31/2015 23:10,San Jose City Hall,10,8/31/2015 23:17,San Salvador at 1st,8,68,Subscriber,95113
913453,789,8/31/2015 23:09,Embarcadero at Folsom,51,8/31/2015 23:22,Embarcadero at Sansome,60,487,Customer,9069
Thanks for the question. Here is the completed code for this problem. Comments are included so that you understand whats going on. Let me know if you have any doubts or if you need anything to change. Thank You !! ============================================================================= import csv def readCSV(file): fh=open(file,'r') data=csv.reader(fh,delimiter=',',quotechar='"') contents=[] count=0 for line in data: count+=1 if (count==1):continue lineData=tuple(line) contents.append(lineData) return contents contents=readCSV('trips_20150831.csv') trips=set() for content in contents:trips.add(content[3]) contents=readCSV('SanFrancisco.csv') SanFranciso=set() for content in contents: SanFranciso.add(content[1]) contents=readCSV('SanJose.csv') SanJose = set() for content in contents: SanJose.add(content[1]) # using union() function to add the elements into a single set SForSJ = SanFranciso.union(SanJose) print('Either in SanFrancisco or San Jose:',SForSJ) #using difference to find cities in trips but not in union set neither=trips.difference(SForSJ) print('Neither in SanFrancisco or San Jose:',neither)
==================================================================================
Here are the data needed for the program. SanFrancisco.csv station_id,name,lat,long,dockcount,landmark,installation 41,Clay at Battery,37.795001,-122.39997,15,San Francisco,8/19/2013 42,Davis at Jac...
CASE 8 Unlocking the Secrets of the Apple iPhone in the Name of access the male San Bernardino suspect's iPhone 5c. Cook stated: Antiterrorism We are challenging the FBI's demands with the deepes respect for American democracy and a love of our country. We believe it would be in the best interest of everyone to step back and consider the implications While we believe the FBI's intentions are good, if would be wrong for the w e nt to force...