<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Intersecting Lists Problem in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686937#M53180</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;List3 should be in the List2 (or ListLayers) order.&amp;nbsp; It is likely that it would match the Table of Contents order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Mar 2019 03:35:24 GMT</pubDate>
    <dc:creator>RandyBurton</dc:creator>
    <dc:date>2019-03-20T03:35:24Z</dc:date>
    <item>
      <title>Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686932#M53175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First post here, please be gentle...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use ArcMap 10.3.1 and I'm having trouble with part of a Python script which will always be run from the Current mxd and active data frame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to pass a list of layers to a function. I have given the script a list of all &lt;STRONG&gt;potential&lt;/STRONG&gt;&amp;nbsp;layers for this function (List 1).&amp;nbsp; Some of those potential layers will actually be in my active data frame (always at least 1), along with other layers that are not compatible with the next function (List2).&amp;nbsp;&amp;nbsp;I want to only work with the potential layers that are actually present in my active data frame (List3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: blue;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #4d4d4d;"&gt;mxd&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d;"&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d;"&gt;MapDocument&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #a31515;"&gt;"CURRENT"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d;"&gt;df&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fafafa;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fafafa;"&gt;&amp;nbsp;mxd.ActiveDataFrame&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;List 1 = ["September", "October", "November", "December"]&lt;/P&gt;&lt;P&gt;List 2 = arcpy.mapping.ListLayers(df)&amp;nbsp; # layers are named September and December&lt;/P&gt;&lt;P&gt;List 3 = list(set.(List1).intersection(List2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is an empty list when it should be September, December.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the syntax roughly works, but the problem is that List2 returns something similar to &amp;lt;layer u'September'&amp;gt; so the two layers with identical names are not recognized as such.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(For context, I'll then be using List3 to print unique messages depending on the layer name returned... In case this helps)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me out?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2019 22:08:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686932#M53175</guid>
      <dc:creator>AlanDodson</dc:creator>
      <dc:date>2019-03-19T22:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686933#M53176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.mapping.ListLayers(df) &lt;/PRE&gt;&lt;P&gt;is returning a list of Layer objects. Something like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;[&amp;lt;map layer u'September '&amp;gt;, &amp;lt;map layer u'December'&amp;gt;]&lt;/PRE&gt;&lt;P&gt;How about the following:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;List2a = []
for l in List2:
&amp;nbsp;&amp;nbsp; &amp;nbsp;List2a.append(str(l.name))&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:48:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686933#M53176</guid>
      <dc:creator>PavanYadav</dc:creator>
      <dc:date>2021-12-12T16:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686934#M53177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found this with a google search:&amp;nbsp;&amp;nbsp;&lt;A class="link-titled" href="https://www.geeksforgeeks.org/python-intersection-two-lists/" title="https://www.geeksforgeeks.org/python-intersection-two-lists/" rel="nofollow noopener noreferrer" target="_blank"&gt;Python | Intersection of two lists - GeeksforGeeks&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it suggests in method 2 something close to what you are trying:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;intersection&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lst1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lst2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; 
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; list&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;set&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lst1&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt; set&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lst2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 
  

lst1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;15&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;9&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;56&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;23&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;78&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;9&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; 
lst2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;9&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;36&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;47&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;26&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;45&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;87&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; 
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;intersection&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lst1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lst2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:53:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686934#M53177</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-12-12T04:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686935#M53178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Pavan suggests, you need to use the layer's name property in your comparison.&amp;nbsp; Try:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy 
mxd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CURRENT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
df &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; mxd&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ActiveDataFrame

List1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"September"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"October"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"November"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"December"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
List2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListLayers&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;df&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;# layers are named September and December&lt;/SPAN&gt;
List3 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; lyr &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; List2&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; List1&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        List3&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT:&amp;nbsp; As &lt;A href="https://community.esri.com/migrated-users/3420" target="_blank"&gt;Joshua Bixby&lt;/A&gt;‌ shows in his code example,&amp;nbsp; line 6 in my code should read as below. See: &lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/listlayers.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;ListLayers&lt;/A&gt;.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# ListLayers (map_document_or_layer, {wildcard}, {data_frame})&lt;/SPAN&gt;

List2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListLayers&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; data_frame&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;df&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:54:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686935#M53178</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-12T04:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686936#M53179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, this looks promising. I didn't&amp;nbsp;get to the layer name before but this looks like it could solve that. I will try it out first thing in the morning and report back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know if this method preserves the list order?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2019 01:49:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686936#M53179</guid>
      <dc:creator>AlanDodson</dc:creator>
      <dc:date>2019-03-20T01:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686937#M53180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;List3 should be in the List2 (or ListLayers) order.&amp;nbsp; It is likely that it would match the Table of Contents order.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2019 03:35:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686937#M53180</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2019-03-20T03:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686938#M53181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately I'm getting an error on the line 'if lyr.name in List2:'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;File "&amp;lt;string&amp;gt;" - AttributeError: 'str' object has no attribute 'name'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I print List2 the entries are still "&amp;lt;layer u'September'&amp;gt;" or something like that so it's not matching List1 "September".&amp;nbsp; My List3 result is a list of lots of duplicates of items in List2 with the&amp;nbsp;&lt;SPAN&gt;"&amp;lt;layer u'September'&amp;gt;" formatting.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2019 11:57:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686938#M53181</guid>
      <dc:creator>AlanDodson</dc:creator>
      <dc:date>2019-03-20T11:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686939#M53182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try str(), like this: &lt;/P&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;List2a.append(str(l.name))&lt;/PRE&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2019 16:03:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686939#M53182</guid>
      <dc:creator>PavanYadav</dc:creator>
      <dc:date>2019-03-20T16:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686940#M53183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works for me:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; mxd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CURRENT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; df &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; mxd&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;activeDataFrame
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; 
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; List1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"September"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"October"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"November"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"December"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; List2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; lyr &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListLayers&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; data_frame&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;df&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; List3 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; list&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;set&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;List1&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;intersection&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;List2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; List3
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;u&lt;SPAN class="string token"&gt;'September'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; u&lt;SPAN class="string token"&gt;'December'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:54:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686940#M53183</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-12T04:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686941#M53184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works for me, thanks so much.&amp;nbsp; If anyone else reading this requires a string it requires the following change:&amp;nbsp; On line 5 change&lt;STRONG&gt; [lyr.name for&lt;/STRONG&gt; ....&amp;nbsp; to &lt;STRONG&gt;[str(lyr.name) for&lt;/STRONG&gt; ....&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2019 17:27:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686941#M53184</guid>
      <dc:creator>AlanDodson</dc:creator>
      <dc:date>2019-03-20T17:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686942#M53185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;lyr.name&lt;/SPAN&gt; returns a &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;unicode&lt;/SPAN&gt;,&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; type&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;type &lt;SPAN class="string token"&gt;'unicode'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am interested in what you are doing that requires conversion to &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;str&lt;/SPAN&gt;, since Unicode and byte strings can be compared directly.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; u &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; u&lt;SPAN class="string token"&gt;"September"&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; type&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;u&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;type &lt;SPAN class="string token"&gt;'unicode'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; 
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; s &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"September"&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; type&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;s&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;type &lt;SPAN class="string token"&gt;'str'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; 
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; u &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; s
&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:54:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686942#M53185</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-12T04:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686943#M53186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am a bit lost to be honest!&amp;nbsp; I'd love to explain but at the moment I don't fully understand what my script is doing and how I can go from there.&amp;nbsp; Perhaps&amp;nbsp;this problem stems from me typing in the first list and hard-coding that into the script, along with each of the subsets of that list.&amp;nbsp; The only real arcpy listlayers list is the one I get from my active data frame.&amp;nbsp; I couldn't figure out any other way to do it - especially when I have to make the subset lists to weed out features.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To recap, I have a list of all potential layer names which I have hardcoded like&amp;nbsp; List1 = ["Quarries", "Ponds", "Gullies", "Runways"].&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not all of these layers are present in each map, so I want to run a function with only the layers from (List1) that are actually in my map (List3 - Ponds &amp;amp; Runways). I have other layers in my dataframe that I cannot fun the function on because the result is not needed and/or I cannot predict what will happen if other users add other datatypes to the dataframe.&amp;nbsp; Every layer in the dataframe makes up List2 (Features, Annotation, Grids, Rasters, user-specific layers etc).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So using the snippet you shared with me I was able to weed out the unnecessary layers, but if I try to print List3 as a check nothing happens, and if I try to get the selection set after my Select By Location loop runs (referenced in another post you have graciously replied to) nothing happens - the script completes properly with no errors, but I do not get the result that I am looking for, 'getSelectionSet &amp;gt; 0' and FIDSet != '' queries do not return anything.&amp;nbsp; Because they do not return anything I can't pass the names of the layers which contain a selection to a bunch of if / elif statements to output specific instructions if that layer meets my conditions...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope to get a handle on things with our on-site ESRI help but he is stretched thin these days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do appreciate your help though, it's made things better &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp; And I'm learning.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2019 19:36:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686943#M53186</guid>
      <dc:creator>AlanDodson</dc:creator>
      <dc:date>2019-03-20T19:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686944#M53187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It appears you want a list of layers based on a predefined list of layer names.&amp;nbsp; Does this work for you:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; mxd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CURRENT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; df &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; mxd&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;activeDataFrame
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; List1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"September"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"October"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"November"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"December"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; List3 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;lyr &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; lyr &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListLayers&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxd&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; data_frame&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;df&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; List1&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; List3
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;map layer u&lt;SPAN class="string token"&gt;'December'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;map layer u&lt;SPAN class="string token"&gt;'September'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:54:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686944#M53187</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-12T04:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686945#M53188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I'm reading that right - List1 is typed-in, hardcoded, predefined etc; List3 creates a true list of layer objects based whether or not the layer object name of everything in the dataframe (pseudo-List2) appears in List1;&amp;nbsp; List3 therefore becomes the resulting list of true layer objects that can be recognized by getSelectionSet and any other method that recognizes layers...&amp;nbsp; If I'm interpreting that correctly I think it would be exactly right.....&amp;nbsp; I'll have to wait to try it out in the morning but this looks promising...&amp;nbsp; Thank you again for walking me through this!&amp;nbsp; I'll let you know how it turns out &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2019 23:31:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686945#M53188</guid>
      <dc:creator>AlanDodson</dc:creator>
      <dc:date>2019-03-20T23:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Intersecting Lists Problem</title>
      <link>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686946#M53189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works even better for my purposes than the first message I marked as correct!&amp;nbsp; Thank you, you've unlocked the key to my problem and I'm happily on my way now....&amp;nbsp; Until the next inexperienced coder hiccup!&amp;nbsp; Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2019 17:46:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersecting-lists-problem/m-p/686946#M53189</guid>
      <dc:creator>AlanDodson</dc:creator>
      <dc:date>2019-03-21T17:46:59Z</dc:date>
    </item>
  </channel>
</rss>

