human
Find maximum distance between any city and station | Function to calculate the maximum distance between any city and its nearest station.
Initialize boolean list.
Assign True to cities containing station ;"
How can the above be solved in Python?

=====
What is a code to find maximum distance between any city and station and the other steps required?
assistant
#Here is code to find maximum distance between any city and station and the other steps required.
 def findMaxDistance ( numOfCities , station ) :
	hasStation = [ False ] * numOfCities
	for city in station :
		hasStation [ city ] = True
	dist , maxDist = 0 , min ( station )
	for city in range ( numOfCities ) :
		if hasStation [ city ] == True :
			maxDist = max ( ( dist + 1 ) // 2 , maxDist )
			dist = 0
		else :
			dist += 1
	return max ( maxDist , dist )
/ * Driver code * /
numOfCities = 6
station = [ 3 , 1 ]
print ( " Max ▁ Distance : " , findMaxDistance ( numOfCities , station ) )