{"id":181922,"date":"2020-10-26T15:20:11","date_gmt":"2020-10-26T07:20:11","guid":{"rendered":"http:\/\/4563.org\/?p=181922"},"modified":"2020-10-26T15:20:11","modified_gmt":"2020-10-26T07:20:11","slug":"%e4%b8%ba%e4%bb%80%e4%b9%88-mylist1-world%e5%92%8c-mylist1-world%e7%9a%84%e7%bb%93%e6%9e%9c%e4%b8%8d%e4%b8%80%e6%a0%b7%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=181922","title":{"rendered":"\u4e3a\u4ec0\u4e48 myList[1:] = &#8220;world&#8221;\u548c myList[1:] = [&#8220;world&#8221;]\u7684\u7ed3\u679c\u4e0d\u4e00\u6837\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u4e3a\u4ec0\u4e48 myList[1:] = &#8220;world&#8221;\u548c myList[1:] = [&#8220;world&#8221;]\u7684\u7ed3\u679c\u4e0d\u4e00\u6837\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : JQiue <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5047\u8bbe\u6709\u4e00\u4e2a\u5217\u8868 <code>myList = ['hello', 1, 2, 3, 4]<\/code><\/p>\n<p>\u5982\u679c <code>myList[1:] = \"world\"<\/code><\/p>\n<p>\u5219\u5f97\u5230<code>['hello', 'w', 'o', 'r', 'l', 'd']<\/code><\/p>\n<p>\u5982\u679c <code>myList[1:] = [\"world\"]<\/code><\/p>\n<p>\u5219\u4f1a\u5f97\u5230<code>['hello', 'world']<\/code><\/p>\n<p>\u8fd9\u662f\u4e3a\u4ec0\u4e48\u5462\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>6<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3949123\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : BigOldBrother <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u201cworld\u201d\u662f\u4e00\u4e2a\u7531&#8217;w&#8217;, &#8216;o&#8217;, &#8216;r&#8217;, &#8216;l&#8217;, &#8216;d&#8217;\u7ec4\u6210\u7684\u5b57\u7b26\u6570\u7ec4\uff0c[&#8220;world&#8221;]\u662f\u4e00\u4e2a\u7531\u201cworld\u201d\u7ec4\u6210\u7684\u666e\u901a\u6570\u7ec4\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949124\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ly4572615 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u65b0\u5143\u7d20\u7684\u7c7b\u578b\u4e0d\u540c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949125\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Pichai <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5728 python \u4e2d\uff0c\u5b57\u7b26\u4e32\u4e5f\u53ef\u4ee5\u5f53\u4f5c list \u6765\u8fdb\u884c\u5904\u7406\u3002python \u5bf9\u5b57\u7b26\u4e32\u6ca1\u6709\u5206\u9694\u7b49\u64cd\u4f5c\uff0c\u90fd\u662f\u901a\u8fc7\u5207\u7247\u6765\u5904\u7406\u7684\u3002<br \/>\u6240\u4ee5 myList[1:] = &#8220;world&#8221;\u4e0e myList[1:] = [&#8216;w&#8217;,&#8217;o&#8217;,&#8217;r&#8217;,&#8217;l&#8217;,&#8217;d&#8217;]\u662f\u76f8\u540c\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949126\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : misaka19000 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53cd\u7f16\u8bd1\u770b\u6c47\u7f16\uff0c\u81f3\u4e8e\u4e3a\u4ec0\u4e48\u90a3\u5c31\u53ea\u80fd\u8bf4\u300c\u8fd9\u95e8\u8bed\u8a00\u5c31\u662f\u8fd9\u6837\u89c4\u5b9a\u7684\u300d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949127\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Muniesa <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u7406\u89e3\u7684\uff0c\u4e0d\u4e00\u5b9a\u5bf9\uff1amyList[1:]\u662f\u4e00\u4e2a list \u7c7b\u578b\uff0cmyList[1:] = &#8220;world&#8221; \u4f1a\u628a\u5b9e\u9645\u4e0a\u662f myList[1:] = list(&#8220;world&#8221;)\uff0clist(&#8220;world&#8221;)\u5b9e\u9645\u4e0a\u5c31\u662f[&#8216;w&#8217;, &#8216;o&#8217;, &#8216;r&#8217;, &#8216;l&#8217;, &#8216;d&#8217;]\uff0c[&#8220;world&#8221;]\u56e0\u4e3a\u672c\u8eab\u5c31\u662f list \u6240\u4ee5\u4f5c\u4e3a\u4e00\u4e2a\u6574\u4f53\u4e86\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3949128\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Muniesa <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e00\u4e2a\u7b80\u5355\u7684\u8bd5\u9a8c\uff1a https:\/\/i.loli.net\/2020\/10\/28\/GrjAXalmUCpYFET.png                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3a\u4ec0\u4e48 myList[1:] = &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/181922"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=181922"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/181922\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=181922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=181922"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=181922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}