title: prolog : using elements of a list in a fact
body: <p>I want to make a Prolog console application that shows venue name and rent for any event for a given(user input) location. So far I have been able to create a list of venues of a given(user input) location. </p>
  
  <p>My code is given below.</p>
  
  <pre><code>listing(venue_location).
  listing(venue_seating).
  listing(venue_overhead).
  
  venue_location(washington_party_hall1, washington).
  venue_location(washington_party_hall2, washington).
  venue_location(newyork_party_hall1, newyork).
  venue_location(newyork_party_hall2, newyork).
  
  venue_capacity(washington_party_hall1,300).
  venue_capacity(washington_party_hall2,450).
  venue_capacity(newyork_party_hall1, 340).
  venue_capacity(newyork_party_hall2,500).
  
  venue_rent(washington_party_hall1,1350).
  venue_rent(washington_party_hall2,1200).
  venue_rent(newyork_party_hall1,1500).
  venue_rent(newyork_party_hall2,1000).
  
  main:-
     write("Enter a location"),nl,write("-&gt;"),
     read(Loc),
     findall(X,venue_location(X,Loc),Venues),
     write(Venues).
  </code></pre>
  
  <p>This gives the following output:</p>
  
  <pre><code>Enter a location
  -&gt;washington.
  [washington_party_hall1,washington_party_hall2]
  true.
  </code></pre>
  
  <p>Is there a way to use the <code>venues</code> list in <code>venue_rent</code> fact to get every list element's rent?
  I want to display the name of these venues with their rents in this way:</p>
  
  <pre><code>washington_party_hall1   1350
  washington_party_hall2   1200
  </code></pre>