- "all", in which case a list of all the specified state is provided
if not isinstance(veh_id, str):
return [self.__vehicles[vehID]["leader"] for vehID in veh_id]
elif veh_id == "all":
return [self.__vehicles[vehID]["leader"] for vehID in self.__ids]
else:
After Change
- "all", in which case a list of all the specified state is provided
if isinstance(veh_id, list):
return [self.get_leader(vehID) for vehID in veh_id]
return self.__vehicles.get(veh_id, {}).get("leader", "")
def get_follower(self, veh_id="all"):