{"id":1772,"date":"2015-01-08T23:56:57","date_gmt":"2015-01-08T15:56:57","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=1772"},"modified":"2015-01-08T23:56:57","modified_gmt":"2015-01-08T15:56:57","slug":"python%e7%9a%84%e4%b8%80%e4%ba%9b%e5%b0%8f%e7%9f%a5%e8%af%86%e7%82%b9_5","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/1772.html","title":{"rendered":"Python\u7684\u4e00\u4e9b\u5c0f\u77e5\u8bc6\u70b9_5"},"content":{"rendered":"<h5>1.\u5982\u4f55\u6bd4\u8f83\u4e24\u4e2a\u6587\u4ef6\u7684\u521b\u5efa\/\u4fee\u6539\u65f6\u95f4\uff1f<\/h5>\n<p>\u786e\u5b9a\u641c\u7d22\u5173\u952e\u5b57\uff1apython compare file mtime\/ctime<\/p>\n<p><a href=\"http:\/\/search.aol.com\/aol\/search?q=python+compare+file+ctime\" target=\"_blank\">http:\/\/search.aol.com\/aol\/search?q=python+compare+file+ctime<\/a><\/p>\n<ul>\n<li><a href=\"http:\/\/code.activestate.com\/recipes\/576804-find-the-oldest-or-yougest-of-a-list-of-files\/\" target=\"_blank\">http:\/\/code.activestate.com\/recipes\/576804-find-the-oldest-or-yougest-of-a-list-of-files\/<\/a> #\u4e00\u884c\u4ee3\u7801\u641e\u5b9a<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true\">file_list = sorted(file_list, key=os.path.getmtime) #\u53c2\u6570\u4e2d\u7684file_list\u4e3a\u8981\u6bd4\u8f83\u7684\u6587\u4ef6\u5217\u8868<\/pre>\n<ul>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/14779775\/how-to-compare-the-modified-date-of-two-files-in-python\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/14779775\/how-to-compare-the-modified-date-of-two-files-in-python<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/237079\/how-to-get-file-creation-modification-date-times-in-python\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/237079\/how-to-get-file-creation-modification-date-times-in-python<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/7430928\/python-comparing-date-check-for-old-file\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/7430928\/python-comparing-date-check-for-old-file<\/a><\/li>\n<\/ul>\n<pre class=\"lang:default decode:true\">file_mtime = os.path.getmtime(file_abs_name) #\u83b7\u53d6\u6587\u4ef6\u7684mtime\u7684\u65b9\u6cd5<\/pre>\n<h5>2.\u5982\u4f55\u6309\u7167\u67d0\u4e2a\u7279\u5b9a\u7684\u987a\u5e8f\u8bfb\u53d6\u6587\u4ef6\u5185\u5bb9\u8fdb\u884c\u5408\u5e76\uff1f<\/h5>\n<p>\u786e\u5b9a\u641c\u7d22\u5173\u952e\u5b57\uff1apython read\/concatenate multiple files in order<\/p>\n<ul>\n<li><a href=\"http:\/\/search.aol.com\/aol\/search?q=python+read+multiple+files+in+sequence\" target=\"_blank\">http:\/\/search.aol.com\/aol\/search?q=python+read+multiple+files+in+sequence<\/a><\/li>\n<li><a href=\"http:\/\/search.aol.com\/aol\/search?q=python+read+multiple+files+in+order\" target=\"_blank\">http:\/\/search.aol.com\/aol\/search?q=python+read+multiple+files+in+order<\/a><\/li>\n<li><a href=\"http:\/\/search.aol.com\/aol\/search?q=python+concatenate+files+in+order\" target=\"_blank\">http:\/\/search.aol.com\/aol\/search?q=python+concatenate+files+in+order<\/a><\/li>\n<\/ul>\n<hr \/>\n<ul>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/17749058\/combine-multiple-text-files-into-one-text-file-using-python\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/17749058\/combine-multiple-text-files-into-one-text-file-using-python<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/13613336\/python-concatenate-text-files\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/13613336\/python-concatenate-text-files<\/a><\/li>\n<li><a href=\"http:\/\/askubuntu.com\/questions\/352198\/reading-all-files-from-a-directory\" target=\"_blank\">http:\/\/askubuntu.com\/questions\/352198\/reading-all-files-from-a-directory<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/10280963\/python-read-from-multiple-files\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/10280963\/python-read-from-multiple-files<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/12093940\/reading-files-in-a-particular-order-in-python\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/12093940\/reading-files-in-a-particular-order-in-python<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/2508610\/most-efficient-way-to-concatenate-and-rearrange-files\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/2508610\/most-efficient-way-to-concatenate-and-rearrange-files<\/a> #\u5f97\u5177\u4f53\u60c5\u51b5\u5177\u4f53\u5206\u6790<\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/9351553\/most-efficient-way-to-concatenate-string\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/9351553\/most-efficient-way-to-concatenate-string<\/a> #\u5229\u7528 str.join() \u51fd\u6570<\/li>\n<li><a href=\"http:\/\/pythonforbiologists.com\/index.php\/introduction-to-python-for-biologists\/reading-and-writing-files\/\" target=\"_blank\">http:\/\/pythonforbiologists.com\/index.php\/introduction-to-python-for-biologists\/reading-and-writing-files\/<\/a><\/li>\n<\/ul>\n<h5>3.\u5982\u4f55\u5220\u9664Python\u7684\u5b57\u5178\u4e2d\u7684\u67d0\u4e2a\u5143\u7d20\uff1f<\/h5>\n<p><a href=\"http:\/\/search.aol.com\/aol\/search?q=python+delete+dict+items\" target=\"_blank\">http:\/\/search.aol.com\/aol\/search?q=python+delete+dict+items<\/a><\/p>\n<p><a href=\"http:\/\/ixyzero.com\/blog\/wp-content\/uploads\/2015\/01\/dict_del.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1773\" src=\"http:\/\/ixyzero.com\/blog\/wp-content\/uploads\/2015\/01\/dict_del-300x280.png\" alt=\"dict_del\" width=\"300\" height=\"280\" \/><\/a><\/p>\n<p>\u603b\u800c\u8a00\u4e4b\u5c312\u79cd\u65b9\u5f0f\uff1adel\u8bed\u53e5 \u6216 \u91cd\u65b0\u8d4b\u503c\u8986\u76d6\u6389<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.python.org\/2\/tutorial\/datastructures.html#dictionaries\" target=\"_blank\">https:\/\/docs.python.org\/2\/tutorial\/datastructures.html#dictionaries<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/5844672\/delete-an-element-from-a-dictionary\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/5844672\/delete-an-element-from-a-dictionary<\/a><\/li>\n<\/ul>\n<h5>4.\u5982\u4f55\u5220\u9664Python\u7684list\u4e2d\u7684\u67d0\u4e2a\u5143\u7d20\uff1f<\/h5>\n<ul>\n<li><a href=\"http:\/\/search.aol.com\/aol\/search?q=python+delete+list+items\" target=\"_blank\">http:\/\/search.aol.com\/aol\/search?q=python+delete+list+items<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/2793324\/is-there-a-simple-way-to-delete-a-list-element-by-value-in-python\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/2793324\/is-there-a-simple-way-to-delete-a-list-element-by-value-in-python<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/627435\/how-to-remove-an-element-from-a-list-by-index-in-python\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/627435\/how-to-remove-an-element-from-a-list-by-index-in-python<\/a><\/li>\n<li><a href=\"https:\/\/docs.python.org\/2\/tutorial\/datastructures.html#the-del-statement\" target=\"_blank\">https:\/\/docs.python.org\/2\/tutorial\/datastructures.html#the-del-statement<\/a> #Python\u7684del\u8bed\u53e5<\/li>\n<\/ul>\n<blockquote><p>list.remove(x)<br \/>\nRemove the first item from the list whose value is x. It is an error if there is no such item.<br \/>\nlist.pop([i])<br \/>\nRemove the item at the given position in the list, and return it. If no index is specified, a.pop() removes and returns the last item in the list. (The square brackets around the i in the method signature denote that the parameter is optional, not that you should type square brackets at that position. You will see this notation frequently in the Python Library Reference.)<\/p><\/blockquote>\n<p><a href=\"https:\/\/docs.python.org\/2\/tutorial\/datastructures.html#more-on-lists\" target=\"_blank\">https:\/\/docs.python.org\/2\/tutorial\/datastructures.html#more-on-lists<\/a> #Python\u7684list\u64cd\u4f5c\u96c6\u5408<\/p>\n<pre class=\"lang:default decode:true\">&gt;&gt;&gt; a = [-1, 1, 66.25, 333, 333, 1234.5]\n&gt;&gt;&gt; del a[0]\n&gt;&gt;&gt; a\n[1, 66.25, 333, 333, 1234.5]\n&gt;&gt;&gt; del a[2:4]\n&gt;&gt;&gt; a\n[1, 66.25, 1234.5]\n&gt;&gt;&gt; del a[:]\n&gt;&gt;&gt; a\n[]<\/pre>\n<h5>5.\u5982\u4f55\u7528Python\u79fb\u52a8\u6587\u4ef6\uff1f<\/h5>\n<p><a href=\"http:\/\/search.aol.com\/aol\/search?q=python+move+file+to+another+dir\" target=\"_blank\">http:\/\/search.aol.com\/aol\/search?q=python+move+file+to+another+dir<\/a><\/p>\n<p>\u63a8\u8350\u4f7f\u7528\uff1ashutil.move()<\/p>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/8858008\/moving-a-file-in-python\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/8858008\/moving-a-file-in-python<\/a><\/p>\n<blockquote><p>os.rename() or shutil.move()<br \/>\nAlthough os.rename() and shutil.move() will both rename files, the command that is closest to the Unix mv command is shutil.move(). <strong><span style=\"color: #ff0000;\">The difference is that os.rename() doesn&#8217;t work if the source and destination are on different disks, while shutil.move() doesn&#8217;t care what disk the files are on.<\/span><\/strong><\/p><\/blockquote>\n<h5>6.Python\u4e2d\u7684sleep\u65b9\u6cd5\u8be5\u600e\u4e48\u5199\uff1f<\/h5>\n<p><a href=\"http:\/\/search.aol.com\/aol\/search?q=python+sleep\" target=\"_blank\">http:\/\/search.aol.com\/aol\/search?q=python+sleep<\/a><\/p>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/510348\/how-can-i-make-a-time-delay-in-python\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/510348\/how-can-i-make-a-time-delay-in-python<\/a><\/p>\n<pre class=\"lang:default decode:true\">import time\ntime.sleep(5) # delays for 5 seconds<\/pre>\n<p>Here is another example where something is run once a minute:<\/p>\n<pre class=\"lang:default decode:true\">import time\nwhile True:\n     print \"This prints once a minute.\"\n     time.sleep(60)  # Delay for 1 minute (60 seconds)<\/pre>\n<h5>7.Python\u4e2d\u7684\u5b57\u7b26\u4e32\u66ff\u6362\uff08\u957f\u5b57\u7b26\u4e32\u66ff\u6362\u7684\u6548\u7387\u5982\u4f55\u8fd8\u4e0d\u6e05\u695a\uff1f\uff09<\/h5>\n<ul>\n<li><a href=\"http:\/\/search.aol.com\/aol\/search?q=Python+str.replace+efficient\" target=\"_blank\">http:\/\/search.aol.com\/aol\/search?q=Python+str.replace+efficient<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/2484156\/is-str-replace-replace-ad-nauseam-a-standard-idiom-in-python\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/2484156\/is-str-replace-replace-ad-nauseam-a-standard-idiom-in-python<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/1919096\/mass-string-replace-in-python\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/1919096\/mass-string-replace-in-python<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/5668947\/python-string-replace-vs-re-sub\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/5668947\/python-string-replace-vs-re-sub<\/a><\/li>\n<\/ul>\n<blockquote><p>As long as you can make do with str.replace(), you should use it. It avoids all the pitfalls of regular expressions (like escaping), and is generally faster.<br \/>\n\u603b\u800c\u8a00\u4e4b\uff0c\u5efa\u8bae\u5c31\u662f\uff1a\u53ef\u4ee5\u7528\u5b57\u7b26\u4e32\u539f\u751f\u51fd\u6570\u7684\u5730\u65b9\u5c31\u4e0d\u8981\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u53bb\u5b8c\u6210\u7c7b\u4f3c\u7684\u5de5\u4f5c\uff0c\u6548\u7387\u9694\u4e86\u597d\u591a\u5462\uff01<\/p><\/blockquote>\n<h5>8.Python\u4e2d\u7684set\u548clist\u7684\u5bf9\u6bd4<\/h5>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/2831212\/python-sets-vs-lists\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/2831212\/python-sets-vs-lists<\/a><\/p>\n<pre class=\"lang:default decode:true\">It depends on what you are intending to do with it. Sets are significantly faster when it comes to determining if an object is present in the set (as in x in s), but are slower than lists when it comes to iterating over their contents. You can use the timeit module to see which is faster for your situation.<\/pre>\n<p>\u5373\uff0c\u6548\u7387\u548c\u5177\u4f53\u7684\u5e94\u7528\u6709\u5173\uff1aset\u7ed3\u6784\u5728\u7528\u4e8e\u5224\u65ad\u67d0\u4e2a\u5143\u7d20\u662f\u5426\u5b58\u5728\u7684\u65f6\u5019\u662f\u975e\u5e38\u5feb\u7684\uff1b\u4f46\u5728\u8fed\u4ee3\u679a\u4e3e\u5305\u542b\u7684\u5143\u7d20\u65f6\uff0c\u8981\u6bd4list\u6162\u3002<\/p>\n<h5>9.Python\u7684join\u65b9\u6cd5\u7684\u4f7f\u7528<\/h5>\n<p>\u5982\u4f55\u8fde\u63a5\u5bf9\u8c61\u6570\u7ec4\uff1f<\/p>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/497765\/python-string-joinlist-on-object-array-rather-than-string-array\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/497765\/python-string-joinlist-on-object-array-rather-than-string-array<\/a><\/p>\n<p>\u89e3\u6cd5\u4e00\uff1a\u5217\u8868\u63a8\u5bfc\u5f0f\uff08\u6216\u751f\u6210\u5668\u8868\u8fbe\u5f0f\uff09<\/p>\n<pre class=\"lang:default decode:true\">', '.join([str(x) for x in list]) # list comprehension\n', '.join(str(x) for x in list) # generator expression<\/pre>\n<p>\u89e3\u6cd5\u4e8c\uff1a\u5584\u7528map\u65b9\u6cd5<\/p>\n<pre class=\"lang:default decode:true\">''.join(map(str,list))<\/pre>\n<p><a href=\"https:\/\/docs.python.org\/2\/library\/stdtypes.html#str.join\" target=\"_blank\">https:\/\/docs.python.org\/2\/library\/stdtypes.html#str.join<\/a><\/p>\n<h5>10.Python\u7684os.walk()\u65b9\u6cd5\u8fd4\u56de\u5185\u5bb9\u7684\u6392\u5e8f<\/h5>\n<p>\u4e4b\u524d\u4e00\u76f4\u4f7f\u7528Python\u7684os.walk()\u65b9\u6cd5\u904d\u5386\u76ee\u5f55\uff0c\u4e5f\u6ca1\u4ec0\u4e48\u5176\u5b83\u7684\u8981\u6c42\uff0c\u7528\u8d77\u6765\u4e5f\u662f\u5f88\u723d\u7684\uff0c\u4f46\u662f\u8fd1\u6765\u6709\u4e2a\u9700\u6c42\uff1a\u5bf9os.walk()\u8fd4\u56de\u7684\u5217\u8868\u6309\u6587\u4ef6\u540d\/\u521b\u5efa\u65f6\u95f4\u8fdb\u884c\u6392\u5e8f\uff0c\u5c31\u6ca1\u6cd5\u4f7f\u7528os.walk()\u81ea\u5df1\u8fd4\u56de\u7684\u5185\u5bb9\u5217\u8868\u4e86\uff0c\u56e0\u4e3a\u4f60\u4e0d\u6e05\u695a\u5b83\u5230\u5e95\u662f\u600e\u4e48\u6392\u5e8f\u7684\uff0c\u4eca\u5929\u7279\u5730\u53bb\u641c\u4e86\u4e00\u4e0b\uff0c\u539f\u6765\u5982\u6b64\uff1a<\/p>\n<p><a href=\"http:\/\/search.aol.com\/aol\/search?q=python+os.walk%28%29+order\" target=\"_blank\">http:\/\/search.aol.com\/aol\/search?q=python+os.walk%28%29+order<\/a><\/p>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/18282370\/python-os-walk-what-order\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/18282370\/python-os-walk-what-order<\/a><\/p>\n<pre class=\"lang:default decode:true\">os.walk uses os.listdir. Here is a the dostring for os.listdir:\nlistdir(path) -&gt; list_of_strings\nReturn a list containing the names of the entries in the directory.\npath: path of directory to list\nThe list is in arbitrary order. It does not include the special entries '.' and '..' even if they are present in the directory.\uff08\u662f\u6309\u4efb\u610f\u987a\u5e8f\u8fd4\u56de\u7684\uff0c\u800c\u4e14\u5728\u4e0d\u540c\u7684filesystem\u4e0a\u8fd4\u56de\u7ed3\u679c\u4e0d\u540c\u2026\u2026\u53ea\u6709\u81ea\u5df1\u5f04\u4e86\u3002\uff09<\/pre>\n<p>\u6240\u4ee5\uff0c\u5982\u679c\u4f60\u6709\u81ea\u5df1\u7684\u9700\u8981\uff0c\u53ef\u4ee5\u4f7f\u7528sort\u6216sorted()\u65b9\u6cd5\u81ea\u5b9a\u4e49\u8fdb\u884c\u6b21\u6392\u5e8f\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.python.org\/2\/library\/os.html#os.walk\" target=\"_blank\">https:\/\/docs.python.org\/2\/library\/os.html#os.walk<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/5667514\/python-listing-dirs-in-a-different-order-based-upon-platform\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/5667514\/python-listing-dirs-in-a-different-order-based-upon-platform<\/a> #\u6392\u5e8f\u7ed3\u679c\u548c\u5b58\u50a8\u7684\u6587\u4ef6\u7cfb\u7edf\u6709\u5173<\/li>\n<li><a href=\"https:\/\/docs.python.org\/2\/library\/string.html#string.index\" target=\"_blank\">https:\/\/docs.python.org\/2\/library\/string.html#string.index<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/663171\/is-there-a-way-to-substring-a-string-in-python\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/663171\/is-there-a-way-to-substring-a-string-in-python<\/a><\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/323689\/python-list-slice-syntax-used-for-no-obvious-reason\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/323689\/python-list-slice-syntax-used-for-no-obvious-reason<\/a><\/li>\n<\/ul>\n<p>\u501f\u7528str.index()\u6216str.rindex()\u65b9\u6cd5 &amp;&amp; \u5217\u8868\u5207\u7247\u53ef\u4ee5\u8fbe\u5230\u67d0\u4e2a\u76ee\u7684\uff1a<\/p>\n<pre class=\"lang:default decode:true\">files_dict = sorted( {item[item.rindex('_')+1:-4]:item for item in os.listdir(path)} )<\/pre>\n<pre class=\"lang:default decode:true \">'''\nIn [5]: xx = '192.168.100.110-80_192.168.100.93-51664_3469669002.txt'\n\nIn [6]: xx.index('_')\nOut[6]: 18\n\nIn [7]: xx[xx.index('_'):-4]\nOut[7]: '_192.168.100.93-51664_3469669002'\n\nIn [8]: xx[xx.rindex('_'):-4]\nOut[8]: '_3469669002'\n\nIn [9]: xx[xx.rindex('_')+1:-4]\nOut[9]: '3469669002'\n\nIn [10]: xx.rindex('_')\nOut[10]: 39\n\nIn [11]: xx.index??\nType: builtin_function_or_method\nString form: &lt;built-in method index of str object at 0x036DD9D0&gt;\nDocstring:\nS.index(sub [,start [,end]]) -&gt; int\n\nLike S.find() but raise ValueError when the substring is not found.\n\nIn [12]: xx.rindex??\nType: builtin_function_or_method\nString form: &lt;built-in method rindex of str object at 0x036DD9D0&gt;\nDocstring:\nS.rindex(sub [,start [,end]]) -&gt; int\n\nLike S.rfind() but raise ValueError when the substring is not found.\n'''<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u5982\u4f55\u6bd4\u8f83\u4e24\u4e2a\u6587\u4ef6\u7684\u521b\u5efa\/\u4fee\u6539\u65f6\u95f4\uff1f \u786e\u5b9a\u641c\u7d22\u5173\u952e\u5b57\uff1apython compare file mtime\/c [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,7],"tags":[8,19],"class_list":["post-1772","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-programing","tag-python","tag-tips"],"views":2171,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/1772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=1772"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/1772\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=1772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=1772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=1772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}