{"id":1483,"date":"2023-05-21T08:27:07","date_gmt":"2023-05-21T08:27:07","guid":{"rendered":"https:\/\/itnotes.apjsoftwares.com\/?p=1483"},"modified":"2023-05-21T08:27:07","modified_gmt":"2023-05-21T08:27:07","slug":"how-can-you-delete-elements-in-array","status":"publish","type":"post","link":"https:\/\/itnotes.apjsoftwares.in\/index.php\/2023\/05\/21\/how-can-you-delete-elements-in-array\/","title":{"rendered":"How can you delete elements in array?"},"content":{"rendered":"\n<p>With this operation, you can delete one item from an array by value. This method accepts only one argument, value. After running this method, the array items are re-arranged, and indices are re-assigned.<\/p>\n\n\n\n<p><strong>The syntax is<\/strong><\/p>\n\n\n\n<p><code>arrayName.remove(value)<\/code><\/p>\n\n\n\n<p><strong>Example<\/strong><\/p>\n\n\n\n<p>Let\u2019s remove the value of \u201c3\u201d from the array<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import array as myarray\nfirst = myarray.array('b', [2, 3, 4]) \nfirst.remove(3) \nprint(first)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>With this operation, you can delete one item from an array by value. This method&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1483"}],"collection":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/comments?post=1483"}],"version-history":[{"count":1,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1483\/revisions"}],"predecessor-version":[{"id":1484,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1483\/revisions\/1484"}],"wp:attachment":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/media?parent=1483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/categories?post=1483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/tags?post=1483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}