Get all other GameObjects (not the one script is attached to)

The question says it all. I need to get all other gameObjects of a tag (which i did) then exclude the gameobject in which the script is attached.

I tried

if(cars *!= transform.gameObject)*

then do what i want to do. (which isnt exactly excluding it from the array, but not using it) but this doesnt work.

May be this will work:

List<GameObject>() cars;

void Start()
{
   cars = new List<GameObject>();
} 

foreach(GameObject car in GameObject.FindGameObjectsWithTag("YourTag"))
{
   if(!car.GetComponent<ScriptToExclude>()) // if the script is not on the gameobject...
   {
      cars.Add(car); // ...add it to the list
   }
}

List cars = new List(GameObject.FindGameObjectsWithTag(“Tag”));

cars.Remove(this.gameObject);

This way you will get all the GameObjects with a certain tag and exclude the GameObject that has this script.