<?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: Python List to Variables. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-list-to-variables/m-p/1513720#M71183</link>
    <description>&lt;P&gt;never mind got it with this&lt;BR /&gt;&lt;BR /&gt;print(r['replicaID'])&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2024 16:06:46 GMT</pubDate>
    <dc:creator>kapalczynski</dc:creator>
    <dc:date>2024-08-01T16:06:46Z</dc:date>
    <item>
      <title>Python List to Variables.</title>
      <link>https://community.esri.com/t5/python-questions/python-list-to-variables/m-p/1513716#M71182</link>
      <description>&lt;P&gt;I query for a list of replicas and am getting this back...&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;replica_list = aah_flc.replicas.get_list()
print(replica_list)
for r in replica_list:
    print(r)

RESULT:
[{'replicaName': 'TESTRepli_1722367918746', 'replicaID': '954xxxxx-FDE4-4DD7-AF63-E5C8D3A5543C'}, {'replicaName': 'TESTRepli_1722367839142', 'replicaID': '2DF44EEC-ADC4-4C4E-8F36-DBxxxxx7D7'}]

{'replicaName': 'TESTRepli_1722367918746', 'replicaID': '954xxxxx-FDE4-4DD7-AF63-E5C8D3A5543C'}

{'replicaName': 'TESTRepli_1722367839142', 'replicaID': '2DF44EEC-ADC4-4C4E-8F36-DBxxxxx7D7'}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for how to loop through this and write each replicaID to a variable...&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead of print(r) I was trying to grab JUST the replicaID but not successful&lt;/P&gt;&lt;P&gt;print(r[0]['replicaID'])&lt;/P&gt;&lt;P&gt;Any thoughts on how to return just the 'replicaID' so I can assign it to a variable to do other things with it like unregister the replica&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 16:04:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-list-to-variables/m-p/1513716#M71182</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2024-08-01T16:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python List to Variables.</title>
      <link>https://community.esri.com/t5/python-questions/python-list-to-variables/m-p/1513720#M71183</link>
      <description>&lt;P&gt;never mind got it with this&lt;BR /&gt;&lt;BR /&gt;print(r['replicaID'])&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 16:06:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-list-to-variables/m-p/1513720#M71183</guid>
      <dc:creator>kapalczynski</dc:creator>
      <dc:date>2024-08-01T16:06:46Z</dc:date>
    </item>
  </channel>
</rss>

