Yeah! You can just add comp("Comp Name") in the beginning like this:
comp("Comp 1").layer("Solid 1").transform.opacity
Or, if you split your timeline panels so you can see each comp's timeline at the same time, you can just pickwhip directly to the layer's opacity in the other comp and you don't even need to type it.