{"id":979377,"date":"2024-12-27T06:45:54","date_gmt":"2024-12-26T22:45:54","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/979377.html"},"modified":"2024-12-27T06:45:56","modified_gmt":"2024-12-26T22:45:56","slug":"python%e5%a6%82%e4%bd%95%e6%9f%a5%e6%89%be%e5%af%b9%e5%ba%94%e7%b4%a2%e5%bc%95","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/979377.html","title":{"rendered":"python\u5982\u4f55\u67e5\u627e\u5bf9\u5e94\u7d22\u5f15"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24205238\/691dbd87-4684-47c7-8c28-6d259ab3e45c.webp\" alt=\"python\u5982\u4f55\u67e5\u627e\u5bf9\u5e94\u7d22\u5f15\" \/><\/p>\n<p><p> <strong>\u5728Python\u4e2d\u67e5\u627e\u5bf9\u5e94\u7d22\u5f15\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528\u5217\u8868\u7684index()\u65b9\u6cd5\u3001\u4f7f\u7528enumerate()\u51fd\u6570\u904d\u5386\u3001\u4f7f\u7528\u5b57\u5178\u3001\u6216\u8005\u901a\u8fc7numpy\u5e93\u7b49\uff0c\u89c6\u5177\u4f53\u60c5\u51b5\u800c\u5b9a\u3002\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u5217\u8868\u7684index()\u65b9\u6cd5\uff0c\u5b83\u975e\u5e38\u7b80\u6d01\u76f4\u89c2\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\u67e5\u627e\u4e00\u4e2a\u5143\u7d20\u5728\u5217\u8868\u4e2d\u7684\u7d22\u5f15\u662f\u4e00\u4e2a\u5e38\u89c1\u7684\u64cd\u4f5c\u3002\u6700\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u5217\u8868\u7684<code>index()<\/code>\u65b9\u6cd5\u3002\u8be5\u65b9\u6cd5\u53ef\u4ee5\u5728\u5217\u8868\u4e2d\u67e5\u627e\u6307\u5b9a\u5143\u7d20\uff0c\u5e76\u8fd4\u56de\u8be5\u5143\u7d20\u7b2c\u4e00\u6b21\u51fa\u73b0\u7684\u7d22\u5f15\u3002\u5982\u679c\u5143\u7d20\u4e0d\u5728\u5217\u8868\u4e2d\uff0c<code>index()<\/code>\u65b9\u6cd5\u5c06\u629b\u51fa\u4e00\u4e2a<code>ValueError<\/code>\u5f02\u5e38\u3002\u4e00\u4e2a\u91cd\u8981\u7684\u6ce8\u610f\u4e8b\u9879\u662f\uff0c<code>index()<\/code>\u65b9\u6cd5\u53ea\u8fd4\u56de\u7b2c\u4e00\u4e2a\u5339\u914d\u9879\u7684\u7d22\u5f15\uff0c\u5982\u679c\u4f60\u9700\u8981\u67e5\u627e\u6240\u6709\u5339\u914d\u9879\u7684\u7d22\u5f15\uff0c\u5219\u9700\u8981\u7ed3\u5408\u5176\u4ed6\u65b9\u6cd5\uff0c\u4f8b\u5982\u4f7f\u7528<code>enumerate()<\/code>\u8fdb\u884c\u904d\u5386\u3002 <\/p>\n<\/p>\n<p><p>\u4e0b\u9762\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8\u5728Python\u4e2d\u67e5\u627e\u5bf9\u5e94\u7d22\u5f15\u7684\u591a\u79cd\u65b9\u6cd5\uff0c\u5e76\u4ecb\u7ecd\u5b83\u4eec\u7684\u9002\u7528\u573a\u666f\u548c\u4f18\u7f3a\u70b9\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u4f7f\u7528<code>index()<\/code>\u65b9\u6cd5\u67e5\u627e\u7d22\u5f15<\/h2>\n<\/p>\n<p><p>Python\u7684\u5217\u8868\u5bf9\u8c61\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5185\u7f6e\u7684<code>index()<\/code>\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7528\u6765\u67e5\u627e\u7279\u5b9a\u5143\u7d20\u7684\u7d22\u5f15\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [&#39;apple&#39;, &#39;banana&#39;, &#39;cherry&#39;, &#39;date&#39;]<\/p>\n<p>index_of_banana = my_list.index(&#39;banana&#39;)<\/p>\n<p>print(index_of_banana)  # \u8f93\u51fa: 1<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u4e2a\u65b9\u6cd5\u7684\u4f18\u70b9\u662f\u7b80\u5355\u6613\u7528\uff0c\u4f46\u4e5f\u6709\u4e00\u4e9b\u9650\u5236\uff1a\u5b83\u53ea\u8fd4\u56de\u5339\u914d\u7684\u7b2c\u4e00\u4e2a\u5143\u7d20\u7684\u7d22\u5f15\uff0c\u5982\u679c\u5143\u7d20\u5728\u5217\u8868\u4e2d\u4e0d\u5b58\u5728\uff0c\u4f1a\u629b\u51fa\u4e00\u4e2a<code>ValueError<\/code>\u5f02\u5e38\u3002\u56e0\u6b64\uff0c\u5728\u4f7f\u7528\u4e4b\u524d\uff0c\u901a\u5e38\u9700\u8981\u5148\u68c0\u67e5\u5143\u7d20\u662f\u5426\u5b58\u5728\u4e8e\u5217\u8868\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>1.1 \u68c0\u67e5\u5143\u7d20\u662f\u5426\u5b58\u5728<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u907f\u514d\u7a0b\u5e8f\u56e0<code>ValueError<\/code>\u800c\u5d29\u6e83\uff0c\u53ef\u4ee5\u5728\u4f7f\u7528<code>index()<\/code>\u4e4b\u524d\uff0c\u5148\u68c0\u67e5\u5143\u7d20\u662f\u5426\u5728\u5217\u8868\u4e2d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">if &#39;banana&#39; in my_list:<\/p>\n<p>    index_of_banana = my_list.index(&#39;banana&#39;)<\/p>\n<p>else:<\/p>\n<p>    index_of_banana = -1  # \u6216\u8005\u5176\u4ed6\u8868\u793a\u672a\u627e\u5230\u7684\u6807\u5fd7<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u589e\u52a0\u4e86\u4e00\u4e9b\u4ee3\u7801\u590d\u6742\u6027\uff0c\u4f46\u4e5f\u63d0\u9ad8\u4e86\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\u3002<\/p>\n<\/p>\n<p><h2>\u4e8c\u3001\u4f7f\u7528<code>enumerate()<\/code>\u51fd\u6570\u67e5\u627e\u6240\u6709\u5339\u914d\u7d22\u5f15<\/h2>\n<\/p>\n<p><p>\u5982\u679c\u9700\u8981\u67e5\u627e\u5217\u8868\u4e2d\u6240\u6709\u5339\u914d\u5143\u7d20\u7684\u7d22\u5f15\uff0c\u53ef\u4ee5\u4f7f\u7528<code>enumerate()<\/code>\u51fd\u6570\u8fdb\u884c\u904d\u5386\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [&#39;apple&#39;, &#39;banana&#39;, &#39;cherry&#39;, &#39;banana&#39;, &#39;date&#39;]<\/p>\n<p>indices_of_banana = [index for index, value in enumerate(my_list) if value == &#39;banana&#39;]<\/p>\n<p>print(indices_of_banana)  # \u8f93\u51fa: [1, 3]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>enumerate()<\/code>\u51fd\u6570\u4e3a\u6bcf\u4e2a\u5143\u7d20\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7d22\u5f15\u548c\u503c\uff0c\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u53ef\u4ee5\u8f7b\u677e\u627e\u5230\u6240\u6709\u7b26\u5408\u6761\u4ef6\u7684\u7d22\u5f15\u3002<\/p>\n<\/p>\n<p><h3>2.1 \u4f7f\u7528\u6761\u4ef6\u5224\u65ad<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u5728\u67e5\u627e\u7d22\u5f15\u65f6\u52a0\u5165\u989d\u5916\u7684\u6761\u4ef6\u5224\u65ad\u3002\u4f8b\u5982\uff0c\u67e5\u627e\u7279\u5b9a\u8303\u56f4\u5185\u7684\u5143\u7d20\u7d22\u5f15\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">indices_in_range = [index for index, value in enumerate(my_list) if value == &#39;banana&#39; and index &gt; 1]<\/p>\n<p>print(indices_in_range)  # \u8f93\u51fa: [3]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u7075\u6d3b\u6027\u5f3a\uff0c\u9002\u5408\u9700\u8981\u590d\u6742\u6761\u4ef6\u5224\u65ad\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h2>\u4e09\u3001\u4f7f\u7528\u5b57\u5178\u5b58\u50a8\u7d22\u5f15\u4fe1\u606f<\/h2>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u9891\u7e41\u67e5\u627e\u7d22\u5f15\u3002\u4e3a\u4e86\u63d0\u9ad8\u6548\u7387\uff0c\u53ef\u4ee5\u9884\u5148\u5c06\u7d22\u5f15\u4fe1\u606f\u5b58\u50a8\u5728\u5b57\u5178\u4e2d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">my_list = [&#39;apple&#39;, &#39;banana&#39;, &#39;cherry&#39;, &#39;banana&#39;, &#39;date&#39;]<\/p>\n<p>index_dict = {}<\/p>\n<p>for index, value in enumerate(my_list):<\/p>\n<p>    if value not in index_dict:<\/p>\n<p>        index_dict[value] = []<\/p>\n<p>    index_dict[value].append(index)<\/p>\n<p>print(index_dict[&#39;banana&#39;])  # \u8f93\u51fa: [1, 3]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u6cd5\u5728\u9700\u8981\u591a\u6b21\u67e5\u627e\u65f6\u6548\u7387\u8f83\u9ad8\uff0c\u4f46\u9700\u8981\u989d\u5916\u7684\u5185\u5b58\u6765\u5b58\u50a8\u7d22\u5f15\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><h3>3.1 \u5b57\u5178\u7684\u4f18\u7f3a\u70b9<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528\u5b57\u5178\u5b58\u50a8\u7d22\u5f15\u4fe1\u606f\u7684\u4f18\u70b9\u5728\u4e8e\u53ef\u4ee5\u5feb\u901f\u67e5\u627e\u7279\u5b9a\u5143\u7d20\u7684\u6240\u6709\u7d22\u5f15\uff0c\u7f3a\u70b9\u662f\u589e\u52a0\u4e86\u5185\u5b58\u4f7f\u7528\uff0c\u5e76\u4e14\u9700\u8981\u5728\u5217\u8868\u66f4\u65b0\u65f6\u540c\u6b65\u66f4\u65b0\u5b57\u5178\u3002<\/p>\n<\/p>\n<p><h2>\u56db\u3001\u4f7f\u7528numpy\u5e93\u8fdb\u884c\u7d22\u5f15\u67e5\u627e<\/h2>\n<\/p>\n<p><p>\u5bf9\u4e8e\u5927\u89c4\u6a21\u6570\u636e\u5904\u7406\uff0c<code>numpy<\/code>\u5e93\u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u6570\u7ec4\u64cd\u4f5c\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>np_array = np.array([&#39;apple&#39;, &#39;banana&#39;, &#39;cherry&#39;, &#39;banana&#39;, &#39;date&#39;])<\/p>\n<p>indices_of_banana = np.where(np_array == &#39;banana&#39;)[0]<\/p>\n<p>print(indices_of_banana)  # \u8f93\u51fa: [1 3]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><code>numpy<\/code>\u7684<code>where()<\/code>\u51fd\u6570\u53ef\u4ee5\u5feb\u901f\u67e5\u627e\u6570\u7ec4\u4e2d\u7b26\u5408\u6761\u4ef6\u7684\u6240\u6709\u7d22\u5f15\uff0c\u9002\u5408\u9700\u8981\u5904\u7406\u5927\u91cf\u6570\u636e\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<p><h3>4.1 numpy\u7684\u4f18\u52bf<\/h3>\n<\/p>\n<p><p><code>numpy<\/code>\u5728\u5904\u7406\u5927\u89c4\u6a21\u6570\u636e\u65f6\u6548\u7387\u975e\u5e38\u9ad8\uff0c\u56e0\u4e3a\u5b83\u4f7f\u7528\u4e86\u5e95\u5c42\u7684C\u8bed\u8a00\u5b9e\u73b0\uff0c\u6027\u80fd\u8fdc\u8fdc\u8d85\u8fc7Python\u7684\u5185\u7f6e\u5217\u8868\u3002\u7136\u800c\uff0c\u5bf9\u4e8e\u5c0f\u89c4\u6a21\u6570\u636e\u5904\u7406\uff0c\u4f7f\u7528<code>numpy<\/code>\u53ef\u80fd\u663e\u5f97\u7e41\u7410\u3002<\/p>\n<\/p>\n<p><h2>\u4e94\u3001\u603b\u7ed3\u4e0e\u5efa\u8bae<\/h2>\n<\/p>\n<p><p>\u5728Python\u4e2d\u67e5\u627e\u5bf9\u5e94\u7d22\u5f15\u7684\u65b9\u6cd5\u591a\u79cd\u591a\u6837\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u4f7f\u7528\u573a\u666f\u548c\u9700\u6c42\u3002\u5bf9\u4e8e\u7b80\u5355\u7684\u67e5\u627e\uff0c<code>index()<\/code>\u65b9\u6cd5\u8db3\u591f\u4f7f\u7528\uff1b\u82e5\u9700\u67e5\u627e\u591a\u4e2a\u7d22\u5f15\u6216\u6709\u6761\u4ef6\u5224\u65ad\uff0c<code>enumerate()<\/code>\u7ed3\u5408\u5217\u8868\u63a8\u5bfc\u5f0f\u662f\u4e0d\u9519\u7684\u9009\u62e9\uff1b\u5bf9\u4e8e\u9891\u7e41\u67e5\u627e\u7684\u573a\u5408\uff0c\u63d0\u524d\u6784\u5efa\u7d22\u5f15\u5b57\u5178\u53ef\u4ee5\u63d0\u5347\u6027\u80fd\uff1b\u800c\u5728\u5927\u89c4\u6a21\u6570\u636e\u5904\u7406\u4e2d\uff0c<code>numpy<\/code>\u5e93\u65e0\u7591\u662f\u6700\u4f73\u9009\u62e9\u3002<\/p>\n<\/p>\n<p><p>\u6839\u636e\u4f60\u7684\u5177\u4f53\u9700\u6c42\u548c\u6570\u636e\u89c4\u6a21\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53ef\u4ee5\u6709\u6548\u63d0\u9ad8\u4ee3\u7801\u7684\u6027\u80fd\u548c\u53ef\u8bfb\u6027\u3002\u5e0c\u671b\u672c\u6587\u7684\u8be6\u7ec6\u4ecb\u7ecd\u80fd\u4e3a\u4f60\u5728Python\u7f16\u7a0b\u4e2d\u63d0\u4f9b\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u67e5\u627e\u5217\u8868\u4e2d\u67d0\u4e2a\u5143\u7d20\u7684\u7d22\u5f15\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>list.index()<\/code>\u65b9\u6cd5\u6765\u67e5\u627e\u5217\u8868\u4e2d\u67d0\u4e2a\u5143\u7d20\u7684\u7d22\u5f15\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u6709\u4e00\u4e2a\u5217\u8868<code>my_list = [10, 20, 30, 40]<\/code>\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7<code>my_list.index(30)<\/code>\u6765\u83b7\u53d6\u5143\u7d2030\u7684\u7d22\u5f15\uff0c\u8be5\u65b9\u6cd5\u4f1a\u8fd4\u56de2\u3002\u5982\u679c\u5143\u7d20\u4e0d\u5b58\u5728\uff0c\u65b9\u6cd5\u4f1a\u5f15\u53d1<code>ValueError<\/code>\u3002<\/p>\n<p><strong>\u6709\u6ca1\u6709\u5176\u4ed6\u65b9\u6cd5\u53ef\u4ee5\u67e5\u627e\u5143\u7d20\u7684\u7d22\u5f15\uff1f<\/strong><br \/>\u9664\u4e86<code>list.index()<\/code>\u65b9\u6cd5\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u5faa\u73af\u7ed3\u5408<code>enumerate()<\/code>\u51fd\u6570\u6765\u67e5\u627e\u7d22\u5f15\u3002\u4f8b\u5982\uff0c<code>for idx, value in enumerate(my_list):<\/code>\u53ef\u4ee5\u8fed\u4ee3\u5217\u8868\uff0c<code>if value == target:<\/code>\u53ef\u4ee5\u8fdb\u884c\u6761\u4ef6\u5224\u65ad\uff0c\u627e\u5230\u76ee\u6807\u5143\u7d20\u7684\u7d22\u5f15\u3002\u8fd9\u79cd\u65b9\u6cd5\u4e0d\u4ec5\u53ef\u4ee5\u5904\u7406\u91cd\u590d\u5143\u7d20\uff0c\u8fd8\u80fd\u63d0\u4f9b\u66f4\u7075\u6d3b\u7684\u67e5\u627e\u65b9\u5f0f\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u5217\u8868\u4e2d\u4e0d\u5b58\u5728\u7684\u5143\u7d20\u7684\u60c5\u51b5\uff1f<\/strong><br \/>\u4f7f\u7528<code>list.index()<\/code>\u65f6\uff0c\u5982\u679c\u5143\u7d20\u4e0d\u5b58\u5728\uff0c\u7a0b\u5e8f\u4f1a\u629b\u51fa\u5f02\u5e38\u3002\u4e3a\u4e86\u907f\u514d\u8fd9\u79cd\u60c5\u51b5\uff0c\u53ef\u4ee5\u4f7f\u7528<code>in<\/code>\u5173\u952e\u5b57\u5148\u68c0\u67e5\u5143\u7d20\u662f\u5426\u5728\u5217\u8868\u4e2d\u3002\u4f8b\u5982\uff0c<code>if target in my_list:<\/code>\u53ef\u4ee5\u5148\u5224\u65ad\u5143\u7d20\u662f\u5426\u5b58\u5728\uff0c\u53ea\u6709\u5728\u786e\u8ba4\u5b58\u5728\u540e\u518d\u8c03\u7528<code>index()<\/code>\u65b9\u6cd5\u3002\u8fd9\u6837\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u5065\u58ee\u6027\uff0c\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u9519\u8bef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u67e5\u627e\u5bf9\u5e94\u7d22\u5f15\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528\u5217\u8868\u7684index()\u65b9\u6cd5\u3001\u4f7f\u7528enumerate()\u51fd\u6570\u904d\u5386 [&hellip;]","protected":false},"author":3,"featured_media":979381,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/979377"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=979377"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/979377\/revisions"}],"predecessor-version":[{"id":979382,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/979377\/revisions\/979382"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/979381"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=979377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=979377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=979377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}