{"id":249,"date":"2018-03-08T14:52:48","date_gmt":"2018-03-08T12:52:48","guid":{"rendered":"http:\/\/users.sch.gr\/chatzipap\/?p=249"},"modified":"2018-03-26T22:17:38","modified_gmt":"2018-03-26T20:17:38","slug":"code_reuse_functions","status":"publish","type":"post","link":"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/","title":{"rendered":"Code ReUse 1 &#8211; Functions"},"content":{"rendered":"<p style=\"text-align: justify;\">\u03a9\u03c1\u03b1\u03af\u03b1\u00a0\u03b2\u03c1\u03ae\u03ba\u03b1\u03bc\u03b5 \u03ad\u03bd\u03b1 \u03c4\u03c1\u03cc\u03c0\u03bf \u03bb\u03bf\u03b9\u03c0\u03cc\u03bd \u03bd\u03b1 \u03b1\u03c6\u03b1\u03b9\u03c1\u03bf\u03cd\u03bc\u03b5 \u03ad\u03bd\u03b1 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c0\u03bf\u03c5 \u03b5\u03bc\u03c6\u03b1\u03bd\u03af\u03b6\u03b5\u03c4\u03b1\u03b9 \u03c3\u03b5 \u03bc\u03af\u03b1 \u03bb\u03af\u03c3\u03c4\u03b1 \u03c0\u03b1\u03c1\u03b1\u03c0\u03ac\u03bd\u03c9 \u03b1\u03c0\u03cc \u03bc\u03af\u03b1 \u03c6\u03bf\u03c1\u03ac. \u0391\u03c2 \u03c3\u03ba\u03b5\u03c6\u03c4\u03bf\u03cd\u03bc\u03b5 \u03cc\u03bc\u03c9\u03c2 \u03bb\u03af\u03b3\u03bf\u00a0\u03c0\u03b9\u03bf \u03b3\u03b5\u03bd\u03b9\u03ba\u03ac. \u03a5\u03bb\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b1\u03bc\u03b5 \u03ad\u03bd\u03b1\u03bd \u03b1\u03bb\u03b3\u03cc\u03c1\u03b9\u03b8\u03bc\u03bf \u03c0\u03bf\u03c5 \u03af\u03c3\u03c9\u03c2 \u03bc\u03b1\u03c2 \u03c6\u03b1\u03bd\u03b5\u03af \u03c7\u03c1\u03ae\u03c3\u03b9\u03bc\u03bf\u03c2 \u03ba\u03b1\u03b9 \u03c3\u03c4\u03b7\u03bd \u03b5\u03c0\u03af\u03bb\u03c5\u03c3\u03b7 \u03ac\u03bb\u03bb\u03c9\u03bd \u03c0\u03c1\u03bf\u03b2\u03bb\u03b7\u03bc\u03ac\u03c4\u03c9\u03bd.\u00a0<!--more--><span style=\"background-color: transparent; font-family: 'Myriad Pro', Myriad, Arial, sans-serif;\">\u03a5\u03c0\u03ac\u03c1\u03c7\u03bf\u03c5\u03bd \u03c4\u03c1\u03cc\u03c0\u03bf\u03b9\u00a0\u00a0\u03ce\u03c3\u03c4\u03b5 \u03bd\u03b1 \u03c4\u03bf\u03bd \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03b4\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03bf \u03c3\u03c4\u03b7\u03bd \u03c0\u03c1\u03bf\u03b3\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03b9\u03c3\u03c4\u03b9\u03ba\u03ae \u03bc\u03b1\u03c2 \u03c6\u03b1\u03c1\u03ad\u03c4\u03c1\u03b1,\u00a0\u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03c6\u03bf\u03c1\u03ac\u00a0?\u00a0\u03ae \u03b8\u03b1 \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03ad\u03bd\u03b1 \u03ba\u03cc\u03c0\u03c5 \u03c0\u03ad\u03ca\u03c3\u03c4, \u03c0\u03c1\u03bf\u03c3\u03b1\u03c1\u03bc\u03cc\u03b6\u03bf\u03bd\u03c4\u03b1\u03c2 \u03c4\u03b1 \u03bf\u03bd\u03cc\u03bc\u03b1\u03c4\u03b1 \u03c4\u03c9\u03bd \u03b1\u03bd\u03c4\u03b9\u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03c9\u03bd.<\/span><\/p>\n<h3>\u039c\u03ad\u03c1\u03bf\u03c2 1\u03bf &#8211; Functions<\/h3>\n<p style=\"text-align: justify;\">\u0391\u03c2 \u03c0\u03ac\u03c1\u03bf\u03c5\u03bc\u03b5 \u03c9\u03c2 \u03c0\u03b1\u03c1\u03ac\u03b4\u03b5\u03b9\u03b3\u03bc\u03b1 \u03b1\u03c5\u03c4\u03cc \u03c0\u03bf\u03c5 \u03b1\u03bd\u03b1\u03c6\u03ad\u03c1\u03b1\u03bc\u03b5 \u03c3\u03b5 \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf \u03ac\u03c1\u03b8\u03c1\u03bf \u03b4\u03b7\u03bb\u03b1\u03b4\u03ae: <strong>\u03c4\u03b7 \u03b4\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae \u03b5\u03bd\u03cc\u03c2 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5 \u03c0\u03bf\u03c5 \u03b5\u03bc\u03c6\u03b1\u03bd\u03af\u03b6\u03b5\u03c4\u03b1\u03b9 \u03c3\u03b5 \u03bc\u03af\u03b1 \u03bb\u03af\u03c3\u03c4\u03b1 \u03c0\u03b5\u03c1\u03b9\u03c3\u03c3\u03cc\u03c4\u03b5\u03c1\u03b5\u03c2 \u03b1\u03c0\u03cc \u03bc\u03af\u03b1 \u03c6\u03bf\u03c1\u03ad\u03c2<\/strong>.<\/p>\n<p style=\"text-align: justify;\">\u0395\u03af\u03c7\u03b1\u03bc\u03b5 \u03bb\u03bf\u03b9\u03c0\u03cc\u03bd \u03c4\u03bf \u03b5\u03be\u03ae\u03c2 \u03c4\u03bc\u03ae\u03bc\u03b1 \u03b3\u03b9\u03b1 \u03c4\u03b7 \u03b4\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae \u03b5\u03bd\u03cc\u03c2 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5:<\/p>\n<pre class=\"lang:python decode:true \" title=\"\u0394\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5 \u03b1\u03c0\u03cc \u03bb\u03af\u03c3\u03c4\u03b1 \u03bc\u03b5 \u03c0\u03bf\u03bb\u03bb\u03b1\u03c0\u03bb\u03ae \u03b5\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7\">&gt;&gt;\r\n&gt;&gt;\r\na_list = [3,4,8,5,8,9,8,2,10]\r\nitem = input(\"Item to delete=\")\r\ni = 0\r\nwhile i &lt;= len(a_list)-1:\r\n    if item == a_list[i]:\r\n        print i, a_list.pop(i)\r\n    else:\r\n        i += 1\r\nprint a_list\r\n------------------------------\r\n&gt;&gt;&gt; \r\nItem to delete=8\r\n2 8\r\n3 8\r\n4 8\r\n[3, 4, 5, 9, 2, 0]<\/pre>\n<p>\u0391\u03c2 \u03c4\u03bf \u03b4\u03bf\u03cd\u03bc\u03b5 \u03c4\u03ce\u03c1\u03b1 \u03c3\u03b5 \u03c3\u03c5\u03bd\u03ac\u03c1\u03c4\u03b7\u03c3\u03b7:<\/p>\n<pre class=\"lang:python decode:true\" title=\"\u03a3\u03c5\u03bd\u03ac\u03c1\u03c4\u03b7\u03c3\u03b7 \u03c0\u03bf\u03c5 \u03b4\u03b9\u03b1\u03b3\u03c1\u03ac\u03c6\u03b5\u03b9 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03bc\u03b5 \u03c0\u03bf\u03bb\u03bb\u03b1\u03c0\u03bb\u03ae \u03b5\u03bc\u03c6\u03ac\u03bd\u03b9\u03c3\u03b7 \u03b1\u03c0\u03cc \u03bb\u03af\u03c3\u03c4\u03b1\">&gt;&gt;&gt;\r\n&gt;&gt;&gt;\r\ndef pop_all(item, a_list):\r\n    '''\u0397 \u03a3\u03c5\u03bd\u03ac\u03c1\u03c4\u03b7\u03c3\u03b7 \u03b4\u03b9\u03b1\u03b3\u03c1\u03ac\u03c6\u03b5\u03b9 \u03c4\u03b1 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03b1\r\n    item \u03b1\u03c0\u03cc \u03c4\u03b7 \u03bb\u03af\u03c3\u03c4\u03b1 a_list'''\r\n    i = 0\r\n    while i &lt;= len(a_list)-1:\r\n        if item == a_list[i]:\r\n            print i, a_list.pop(i)\r\n        else:\r\n            i += 1\r\n\r\n# \u03a0\u03b1\u03c1\u03b1\u03b4\u03b5\u03af\u03b3\u03bc\u03b1\u03c4\u03b1 \u03ba\u03bb\u03ae\u03c3\u03b7\u03c2\r\n#----------------------------------------------------\r\nmy_list = [3,4,8,5,8,9,8,2,0]\r\npop_all(8, my_list)\r\nprint my_list\r\n\r\nnames_list = ['tasos', 'maria', 'antonis', 'anna', 'tasos']\r\npop_all('tasos', names_list)\r\nprint names_list\r\n\r\nlist_of_lists = [[1,2,3],[4,5,6],[7,8,9],[1,2,3]]\r\nx = [1,2,3]\r\npop_all(x, list_of_lists)\r\nprint list_of_lists\r\n# -------------------------------------------------\r\n# \u0391\u03c0\u03bf\u03c4\u03b5\u03bb\u03ad\u03c3\u03bc\u03b1\u03c4\u03b1\r\n&gt;&gt;&gt; \r\n2 8\r\n3 8\r\n4 8\r\n[3, 4, 5, 9, 2, 0]\r\n-------------------------------------------------\r\n0 tasos\r\n3 tasos\r\n['maria', 'antonis', 'anna']\r\n-------------------------------------------------\r\n0 [1, 2, 3]\r\n2 [1, 2, 3]\r\n[[4, 5, 6], [7, 8, 9]]\r\n&gt;&gt;&gt;<\/pre>\n<p style=\"text-align: justify;\"><img loading=\"lazy\" class=\"alignleft\" src=\"https:\/\/www.toonpool.com\/user\/997\/files\/berlieve_everything_read_caveman_756445.jpg\" alt=\"Related image\" width=\"258\" height=\"184\" \/>\u03a7\u03bc\u03bc\u03bc \u03ad\u03bd\u03b1 \u03b8\u03ad\u03bc\u03b1 \u03c4\u03ce\u03c1\u03b1 \u03c0\u03bf\u03c5 \u03c0\u03c1\u03bf\u03ba\u03cd\u03c0\u03c4\u03b5\u03b9 \u03b5\u03af\u03bd\u03b1\u03b9 \u03cc\u03c4\u03b9 \u03b7 \u03c3\u03c5\u03bd\u03ac\u03c1\u03c4\u03b7\u03c3\u03b7 \u03b1\u03c5\u03c4\u03ae \u03b4\u03b5\u03bd \u03ad\u03c7\u03b5\u03b9 return ??? \u03b4\u03b7\u03bb\u03b1\u03b4\u03ae \u03c4\u03b9 ? \u03b4\u03b5\u03bd \u03b5\u03c0\u03b9\u03c3\u03c4\u03c1\u03ad\u03c6\u03b5\u03b9 \u03c4\u03af\u03c0\u03bf\u03c4\u03b1 ? \u03ba\u03b1\u03b9 \u03c0\u03c9\u03c2 \u03b3\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 !!!<\/p>\n<p style=\"text-align: justify;\">\u0398\u03b1 \u03c4\u03b1 \u03b5\u03be\u03b7\u03b3\u03ae\u03c3\u03bf\u03c5\u03bc\u03b5 \u03c3\u03b5 \u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03bf \u03ac\u03c1\u03b8\u03c1\u03bf \u03c0\u03c1\u03bf\u03c2 \u03c4\u03bf \u03c0\u03b1\u03c1\u03cc\u03bd \u03bb\u03bf\u03b9\u03c0\u03cc\u03bd \u03c5\u03bb\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 \u03b5\u03ac\u03bd \u03c3\u03b1\u03c2 \u03bc\u03c0\u03b5\u03c1\u03b4\u03b5\u03cd\u03b5\u03b9 \u03c4\u03b7 \u03c3\u03c5\u03bd\u03ac\u03c1\u03c4\u03b7\u03c3\u03b7 \u03cc\u03c0\u03c9\u03c2 \u03c6\u03b1\u03af\u03bd\u03b5\u03c4\u03b1\u03b9 \u03c0\u03b9\u03bf \u03ba\u03ac\u03c4\u03c9 \u03bc\u03b5 \u03c4\u03bf \u03b3\u03bd\u03c9\u03c3\u03c4\u03cc return \u03c3\u03c4\u03bf \u03c4\u03ad\u03bb\u03bf\u03c2 \u03c4\u03b7\u03c2 (\u03c5\u03c0\u03b5\u03bd\u03b8\u03c5\u03bc\u03af\u03b6\u03bf\u03c5\u03bc\u03b5 \u03cc\u03c4\u03b9 \u03c4\u03bf \u03b1\u03bd\u03c4\u03b9\u03ba\u03b5\u03af\u03bc\u03b5\u03bd\u03bf \u03bb\u03af\u03c3\u03c4\u03b1\u03c2 \u03c3\u03c4\u03b7\u03bd python \u03c0\u03b1\u03c1\u03ac\u03b3\u03b5\u03b9 mutable \u03c3\u03c4\u03b9\u03b3\u03bc\u03b9\u03cc\u03c4\u03c5\u03c0\u03b1:<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:python decode:true\" title=\"\u03a4\u03c1\u03bf\u03c0\u03bf\u03af\u03b7\u03c3\u03b7 \u03c3\u03c5\u03bd\u03ac\u03c1\u03c4\u03b7\u03c3\u03b7\u03c2 \u03b4\u03b9\u03b1\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf\u03c5\">&gt;&gt;&gt;\r\n&gt;&gt;&gt;\r\ndef pop_all(item, a_list):\r\n    '''\u0397 \u03a3\u03c5\u03bd\u03ac\u03c1\u03c4\u03b7\u03c3\u03b7 \u03b4\u03b9\u03b1\u03b3\u03c1\u03ac\u03c6\u03b5\u03b9 \u03c4\u03b1 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03b1\r\n    item \u03b1\u03c0\u03cc \u03c4\u03b7 \u03bb\u03af\u03c3\u03c4\u03b1 a_list'''\r\n    i = 0\r\n    while i &lt;= len(a_list)-1:\r\n        if item == a_list[i]:\r\n            print i, a_list.pop(i)\r\n        else:\r\n            i += 1\r\n    return a_list<\/pre>\n<p><img loading=\"lazy\" class=\"alignleft\" src=\"https:\/\/technofriends.files.wordpress.com\/2008\/02\/polymorphism.gif\" alt=\"Image result for polymorphism\" width=\"270\" height=\"265\" \/>\u0395\u03bd\u00a0\u03c4\u03c9 \u03bc\u03b5\u03c4\u03b1\u03be\u03cd (\u03ae <a href=\"http:\/\/www.tovima.gr\/opinions\/article\/?aid=109923\">\u03b5\u03bd\u03c4\u03c9\u03bc\u03b5\u03c4\u03b1\u03be\u03cd<\/a>) \u03bc\u03c0\u03bf\u03c1\u03b5\u03af\u03c4\u03b5 \u03bd\u03b1 \u03b1\u03c0\u03bf\u03bb\u03b1\u03cd\u03c3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03b5\u03c5\u03b5\u03bb\u03b9\u03be\u03af\u03b1 \u03c4\u03b7\u03c2 python \u03cc\u03c0\u03bf\u03c5, \u03b7 \u03af\u03b4\u03b9\u03b1 \u03c3\u03c5\u03bd\u03ac\u03c1\u03c4\u03b7\u03c3\u03b7 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03b4\u03bf\u03c5\u03bb\u03ad\u03c8\u03b5\u03b9 <strong>\u03ba\u03b1\u03b9<\/strong> \u03bc\u03b5 \u03bb\u03af\u03c3\u03c4\u03b1 \u03b1\u03ba\u03b5\u03c1\u03b1\u03af\u03c9\u03bd <strong>\u03ba\u03b1\u03b9<\/strong> \u03bc\u03b5 \u03bb\u03af\u03c3\u03c4\u03b1\u00a0\u03b1\u03bb\u03c6\u03b1\u03c1\u03b9\u03b8\u03bc\u03b7\u03c4\u03b9\u03ba\u03ce\u03bd\u00a0<strong>\u03ba\u03b1\u03b9<\/strong>\u00a0\u03bc\u03b5 \u03bb\u03af\u03c3\u03c4\u03b1 \u03bb\u03b9\u03c3\u03c4\u03ce\u03bd <strong>\u03ba\u03b1\u03b9<\/strong> \u03b3\u03b5\u03bd\u03b9\u03ba\u03ac \u03bc\u03b5 \u03bf\u03c0\u03bf\u03b9\u03b1\u03b4\u03ae\u03c0\u03bf\u03c4\u03b5 \u03bb\u03af\u03c3\u03c4\u03b1 \u03b1\u03bd\u03c4\u03b9\u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03c9\u03bd. \u03a7\u03b1\u03c1\u03b1\u03ba\u03c4\u03b7\u03c1\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc \u03c0\u03bf\u03c5 \u03bf\u03bd\u03bf\u03bc\u03ac\u03b6\u03b5\u03c4\u03b1\u03b9:<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/el.wikipedia.org\/wiki\/%CE%A0%CE%BF%CE%BB%CF%85%CE%BC%CE%BF%CF%81%CF%86%CE%B9%CF%83%CE%BC%CF%8C%CF%82_(%CF%85%CF%80%CE%BF%CE%BB%CE%BF%CE%B3%CE%B9%CF%83%CF%84%CE%AD%CF%82)\"><strong>\u03a0\u03bf\u03bb\u03c5\u03bc\u03bf\u03c1\u03c6\u03b9\u03c3\u03bc\u03cc\u03c2<\/strong><\/a><\/p>\n<p style=\"text-align: justify;\">\u03c4\u03b9 \u03c0\u03c9\u03c2? \u03b4\u03b5\u03bd \u03ba\u03b1\u03c4\u03b1\u03bb\u03ac\u03b2\u03b1\u03c4\u03b5?? \u03bf\u03c5\u03c6 \u03c0\u03bf\u03bb\u03bb\u03ac \u03b8\u03ad\u03bc\u03b1\u03c4\u03b1 \u03c0\u03c1\u03bf\u03ad\u03ba\u03c5\u03c8\u03b1\u03bd \u03c0\u03ac\u03bc\u03b5 \u03bd\u03b1 \u03bb\u03cd\u03c3\u03bf\u03c5\u03bc\u03b5 \u03ad\u03bd\u03b1 \u03ba\u03b1\u03b9 \u03c0\u03c1\u03bf\u03ba\u03cd\u03c0\u03c4\u03bf\u03c5\u03bd \u03ba\u03b1\u03b9 \u03ac\u03bb\u03bb\u03b1, \u03c4\u03b9 \u03bc\u03bf\u03c5 \u03b8\u03c5\u03bc\u03af\u03b6\u03b5\u03b9 \u03b1\u03c5\u03c4\u03cc, \u03bc\u03b1 \u03ba\u03ac\u03c4\u03b9 \u03bc\u03bf\u03c5 \u03b8\u03c5\u03bc\u03af\u03b6\u03b5\u03b9:<img class=\"alignright\" src=\"http:\/\/1.bp.blogspot.com\/-VQvCtFuSGCw\/Un-_W89-DrI\/AAAAAAAAAJU\/wvHbGIngki8\/s1600\/%CE%BA%CE%B1%CF%84%CE%AC%CE%BB%CE%BF%CE%B3%CE%BF%CF%821.jpg\" alt=\"Image result for \u03bb\u03b5\u03c1\u03bd\u03b1\u03b9\u03b1 \u03c5\u03b4\u03c1\u03b1\" \/><\/p>\n<p>\u00a0\u03b1\u03c2 \u03c4\u03bf \u03b1\u03c6\u03ae\u03c3\u03bf\u03c5\u03bc\u03b5 \u03ba\u03b1\u03b9 \u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03b8\u03ad\u03bc\u03b1 \u03bb\u03bf\u03b9\u03c0\u03cc\u03bd (\u03c4\u03bf\u03bd \u03c0\u03bf\u03bb\u03c5\u03bc\u03bf\u03c1\u03c6\u03b9\u03c3\u03bc\u03cc) \u03b3\u03b9\u03b1 \u03ac\u03bb\u03bb\u03b7 \u03c6\u03bf\u03c1\u03ac !!! \u0391\u03c5\u03c4\u03ae \u03b7 \u03c0\u03b1\u03c1\u03bf\u03b9\u03bc\u03af\u03b1 &#8220;<strong>\u03bc\u03b7\u03bd \u03ba\u03ac\u03bd\u03b5\u03b9\u03c2 \u03c3\u03ae\u03bc\u03b5\u03c1\u03b1 \u03b1\u03c5\u03c4\u03cc \u03c0\u03bf\u03c5 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af\u03c2 \u03bd\u03b1 \u03b1\u03c6\u03ae\u03c3\u03b5\u03b9\u03c2 \u03b3\u03b9\u03b1 \u03b1\u03cd\u03c1\u03b9\u03bf<\/strong>&#8221; \u03b1\u03c0\u03bf\u03b4\u03b5\u03b9\u03ba\u03bd\u03cd\u03b5\u03c4\u03b1\u03b9 \u03c3\u03c5\u03c7\u03bd\u03ac \u03c0\u03bf\u03bb\u03cd \u03c7\u03c1\u03ae\u03c3\u03b9\u03bc\u03b7 \u03ae &#8230;. \u03ae \u03bc\u03ae\u03c0\u03c9\u03c2 \u03c4\u03b7 \u03b8\u03c5\u03bc\u03ac\u03bc\u03b1\u03b9 \u03bb\u03ac\u03b8\u03bf\u03c2 ???<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u03a9\u03c1\u03b1\u03af\u03b1\u00a0\u03b2\u03c1\u03ae\u03ba\u03b1\u03bc\u03b5 \u03ad\u03bd\u03b1 \u03c4\u03c1\u03cc\u03c0\u03bf \u03bb\u03bf\u03b9\u03c0\u03cc\u03bd \u03bd\u03b1 \u03b1\u03c6\u03b1\u03b9\u03c1\u03bf\u03cd\u03bc\u03b5 \u03ad\u03bd\u03b1 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03bf \u03c0\u03bf\u03c5 \u03b5\u03bc\u03c6\u03b1\u03bd\u03af\u03b6\u03b5\u03c4\u03b1\u03b9 \u03c3\u03b5 \u03bc\u03af\u03b1 \u03bb\u03af\u03c3\u03c4\u03b1 \u03c0\u03b1\u03c1\u03b1\u03c0\u03ac\u03bd\u03c9 \u03b1\u03c0\u03cc \u03bc\u03af\u03b1 \u03c6\u03bf\u03c1\u03ac. \u0391\u03c2 \u03c3\u03ba\u03b5\u03c6\u03c4\u03bf\u03cd\u03bc\u03b5 \u03cc\u03bc\u03c9\u03c2 \u03bb\u03af\u03b3\u03bf\u00a0\u03c0\u03b9\u03bf \u03b3\u03b5\u03bd\u03b9\u03ba\u03ac. \u03a5\u03bb\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b1\u03bc\u03b5 \u03ad\u03bd\u03b1\u03bd \u03b1\u03bb\u03b3\u03cc\u03c1\u03b9\u03b8\u03bc\u03bf \u03c0\u03bf\u03c5 \u03af\u03c3\u03c9\u03c2 \u03bc\u03b1\u03c2 \u03c6\u03b1\u03bd\u03b5\u03af \u03c7\u03c1\u03ae\u03c3\u03b9\u03bc\u03bf\u03c2 \u03ba\u03b1\u03b9 \u03c3\u03c4\u03b7\u03bd \u03b5\u03c0\u03af\u03bb\u03c5\u03c3\u03b7 \u03ac\u03bb\u03bb\u03c9\u03bd \u03c0\u03c1\u03bf\u03b2\u03bb\u03b7\u03bc\u03ac\u03c4\u03c9\u03bd.\u00a0<\/p>\n<p> <a class=\"continue-reading-link\" href=\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/\"><span>\u0394\u0399\u0391\u0392\u0391\u03a3\u03a4\u0395 \u03a4\u0397 \u03a3\u03a5\u039d\u0395\u03a7\u0395\u0399\u0391<\/span><i class=\"crycon-right-dir\"><\/i><\/a> <\/p>\n","protected":false},"author":1,"featured_media":252,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[8],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Code ReUse 1 - Functions - \u03ba\u03cd\u03c1\u03b9\u03b5 \u03b4\u03b5\u03bd \u03ad\u03c7\u03c9 internet<\/title>\n<meta name=\"description\" content=\"\u03a5\u03bb\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b1\u03bc\u03b5 \u03ad\u03bd\u03b1\u03bd \u03b1\u03bb\u03b3\u03cc\u03c1\u03b9\u03b8\u03bc\u03bf \u03c0\u03bf\u03c5 \u03af\u03c3\u03c9\u03c2 \u03bc\u03b1\u03c2 \u03c6\u03b1\u03bd\u03b5\u03af \u03c7\u03c1\u03ae\u03c3\u03b9\u03bc\u03bf\u03c2 \u03ba\u03b1\u03b9 \u03c3\u03c4\u03b7\u03bd \u03b5\u03c0\u03af\u03bb\u03c5\u03c3\u03b7 \u03ac\u03bb\u03bb\u03c9\u03bd \u03c0\u03c1\u03bf\u03b2\u03bb\u03b7\u03bc\u03ac\u03c4\u03c9\u03bd. \u03a5\u03c0\u03ac\u03c1\u03c7\u03bf\u03c5\u03bd \u03c4\u03c1\u03cc\u03c0\u03bf\u03b9\u00a0\u00a0\u03ce\u03c3\u03c4\u03b5 \u03bd\u03b1 \u03c4\u03bf\u03bd \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03b4\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03bf \u03c3\u03c4\u03b7\u03bd \u03c0\u03c1\u03bf\u03b3\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03b9\u03c3\u03c4\u03b9\u03ba\u03ae \u03bc\u03b1\u03c2 \u03c6\u03b1\u03c1\u03ad\u03c4\u03c1\u03b1,\u00a0\u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03c6\u03bf\u03c1\u03ac\u00a0?\u00a0\u03ae \u03b8\u03b1 \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03ad\u03bd\u03b1 \u03ba\u03cc\u03c0\u03c5 \u03c0\u03ad\u03ca\u03c3\u03c4, \u03c0\u03c1\u03bf\u03c3\u03b1\u03c1\u03bc\u03cc\u03b6\u03bf\u03bd\u03c4\u03b1\u03c2 \u03c4\u03b1 \u03bf\u03bd\u03cc\u03bc\u03b1\u03c4\u03b1 \u03c4\u03c9\u03bd \u03b1\u03bd\u03c4\u03b9\u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03c9\u03bd.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Code ReUse 1 - Functions - \u03ba\u03cd\u03c1\u03b9\u03b5 \u03b4\u03b5\u03bd \u03ad\u03c7\u03c9 internet\" \/>\n<meta property=\"og:description\" content=\"\u03a5\u03bb\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b1\u03bc\u03b5 \u03ad\u03bd\u03b1\u03bd \u03b1\u03bb\u03b3\u03cc\u03c1\u03b9\u03b8\u03bc\u03bf \u03c0\u03bf\u03c5 \u03af\u03c3\u03c9\u03c2 \u03bc\u03b1\u03c2 \u03c6\u03b1\u03bd\u03b5\u03af \u03c7\u03c1\u03ae\u03c3\u03b9\u03bc\u03bf\u03c2 \u03ba\u03b1\u03b9 \u03c3\u03c4\u03b7\u03bd \u03b5\u03c0\u03af\u03bb\u03c5\u03c3\u03b7 \u03ac\u03bb\u03bb\u03c9\u03bd \u03c0\u03c1\u03bf\u03b2\u03bb\u03b7\u03bc\u03ac\u03c4\u03c9\u03bd. \u03a5\u03c0\u03ac\u03c1\u03c7\u03bf\u03c5\u03bd \u03c4\u03c1\u03cc\u03c0\u03bf\u03b9\u00a0\u00a0\u03ce\u03c3\u03c4\u03b5 \u03bd\u03b1 \u03c4\u03bf\u03bd \u03ad\u03c7\u03bf\u03c5\u03bc\u03b5 \u03b4\u03b9\u03b1\u03b8\u03ad\u03c3\u03b9\u03bc\u03bf \u03c3\u03c4\u03b7\u03bd \u03c0\u03c1\u03bf\u03b3\u03c1\u03b1\u03bc\u03bc\u03b1\u03c4\u03b9\u03c3\u03c4\u03b9\u03ba\u03ae \u03bc\u03b1\u03c2 \u03c6\u03b1\u03c1\u03ad\u03c4\u03c1\u03b1,\u00a0\u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03c6\u03bf\u03c1\u03ac\u00a0?\u00a0\u03ae \u03b8\u03b1 \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03ba\u03ac\u03bd\u03bf\u03c5\u03bc\u03b5 \u03ad\u03bd\u03b1 \u03ba\u03cc\u03c0\u03c5 \u03c0\u03ad\u03ca\u03c3\u03c4, \u03c0\u03c1\u03bf\u03c3\u03b1\u03c1\u03bc\u03cc\u03b6\u03bf\u03bd\u03c4\u03b1\u03c2 \u03c4\u03b1 \u03bf\u03bd\u03cc\u03bc\u03b1\u03c4\u03b1 \u03c4\u03c9\u03bd \u03b1\u03bd\u03c4\u03b9\u03ba\u03b5\u03b9\u03bc\u03ad\u03bd\u03c9\u03bd.\" \/>\n<meta property=\"og:url\" content=\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/\" \/>\n<meta property=\"og:site_name\" content=\"\u03ba\u03cd\u03c1\u03b9\u03b5 \u03b4\u03b5\u03bd \u03ad\u03c7\u03c9 internet\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-08T12:52:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-26T20:17:38+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/users.sch.gr\/chatzipap\/wp-content\/uploads\/2018\/03\/hercules-lernea-ydra.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"534\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/#website\",\"url\":\"http:\/\/users.sch.gr\/chatzipap\/\",\"name\":\"\\u03ba\\u03cd\\u03c1\\u03b9\\u03b5 \\u03b4\\u03b5\\u03bd \\u03ad\\u03c7\\u03c9 internet\",\"description\":\"\\u0391\\u03bd\\u03b1\\u03c3\\u03c4\\u03ac\\u03c3\\u03b9\\u03bf\\u03c2 \\u03a7\\u03b1\\u03c4\\u03b6\\u03b7\\u03c0\\u03b1\\u03c0\\u03b1\\u03b4\\u03cc\\u03c0\\u03bf\\u03c5\\u03bb\\u03bf\\u03c2\",\"publisher\":{\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/#\/schema\/person\/bcd297efd76b38bf6c373530ffa82629\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"http:\/\/users.sch.gr\/chatzipap\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"http:\/\/users.sch.gr\/chatzipap\/wp-content\/uploads\/2018\/03\/hercules-lernea-ydra.jpg\",\"contentUrl\":\"http:\/\/users.sch.gr\/chatzipap\/wp-content\/uploads\/2018\/03\/hercules-lernea-ydra.jpg\",\"width\":534,\"height\":600},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/#webpage\",\"url\":\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/\",\"name\":\"Code ReUse 1 - Functions - \\u03ba\\u03cd\\u03c1\\u03b9\\u03b5 \\u03b4\\u03b5\\u03bd \\u03ad\\u03c7\\u03c9 internet\",\"isPartOf\":{\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/#primaryimage\"},\"datePublished\":\"2018-03-08T12:52:48+00:00\",\"dateModified\":\"2018-03-26T20:17:38+00:00\",\"description\":\"\\u03a5\\u03bb\\u03bf\\u03c0\\u03bf\\u03b9\\u03ae\\u03c3\\u03b1\\u03bc\\u03b5 \\u03ad\\u03bd\\u03b1\\u03bd \\u03b1\\u03bb\\u03b3\\u03cc\\u03c1\\u03b9\\u03b8\\u03bc\\u03bf \\u03c0\\u03bf\\u03c5 \\u03af\\u03c3\\u03c9\\u03c2 \\u03bc\\u03b1\\u03c2 \\u03c6\\u03b1\\u03bd\\u03b5\\u03af \\u03c7\\u03c1\\u03ae\\u03c3\\u03b9\\u03bc\\u03bf\\u03c2 \\u03ba\\u03b1\\u03b9 \\u03c3\\u03c4\\u03b7\\u03bd \\u03b5\\u03c0\\u03af\\u03bb\\u03c5\\u03c3\\u03b7 \\u03ac\\u03bb\\u03bb\\u03c9\\u03bd \\u03c0\\u03c1\\u03bf\\u03b2\\u03bb\\u03b7\\u03bc\\u03ac\\u03c4\\u03c9\\u03bd. \\u03a5\\u03c0\\u03ac\\u03c1\\u03c7\\u03bf\\u03c5\\u03bd \\u03c4\\u03c1\\u03cc\\u03c0\\u03bf\\u03b9\\u00a0\\u00a0\\u03ce\\u03c3\\u03c4\\u03b5 \\u03bd\\u03b1 \\u03c4\\u03bf\\u03bd \\u03ad\\u03c7\\u03bf\\u03c5\\u03bc\\u03b5 \\u03b4\\u03b9\\u03b1\\u03b8\\u03ad\\u03c3\\u03b9\\u03bc\\u03bf \\u03c3\\u03c4\\u03b7\\u03bd \\u03c0\\u03c1\\u03bf\\u03b3\\u03c1\\u03b1\\u03bc\\u03bc\\u03b1\\u03c4\\u03b9\\u03c3\\u03c4\\u03b9\\u03ba\\u03ae \\u03bc\\u03b1\\u03c2 \\u03c6\\u03b1\\u03c1\\u03ad\\u03c4\\u03c1\\u03b1,\\u00a0\\u03b3\\u03b9\\u03b1 \\u03c4\\u03b7\\u03bd \\u03b5\\u03c0\\u03cc\\u03bc\\u03b5\\u03bd\\u03b7 \\u03c6\\u03bf\\u03c1\\u03ac\\u00a0?\\u00a0\\u03ae \\u03b8\\u03b1 \\u03c0\\u03c1\\u03ad\\u03c0\\u03b5\\u03b9 \\u03ba\\u03ac\\u03bd\\u03bf\\u03c5\\u03bc\\u03b5 \\u03ad\\u03bd\\u03b1 \\u03ba\\u03cc\\u03c0\\u03c5 \\u03c0\\u03ad\\u03ca\\u03c3\\u03c4, \\u03c0\\u03c1\\u03bf\\u03c3\\u03b1\\u03c1\\u03bc\\u03cc\\u03b6\\u03bf\\u03bd\\u03c4\\u03b1\\u03c2 \\u03c4\\u03b1 \\u03bf\\u03bd\\u03cc\\u03bc\\u03b1\\u03c4\\u03b1 \\u03c4\\u03c9\\u03bd \\u03b1\\u03bd\\u03c4\\u03b9\\u03ba\\u03b5\\u03b9\\u03bc\\u03ad\\u03bd\\u03c9\\u03bd.\",\"breadcrumb\":{\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/users.sch.gr\/chatzipap\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Code ReUse 1 &#8211; Functions\"}]},{\"@type\":\"Article\",\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/#webpage\"},\"author\":{\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/#\/schema\/person\/bcd297efd76b38bf6c373530ffa82629\"},\"headline\":\"Code ReUse 1 &#8211; Functions\",\"datePublished\":\"2018-03-08T12:52:48+00:00\",\"dateModified\":\"2018-03-26T20:17:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/#webpage\"},\"wordCount\":14,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/#\/schema\/person\/bcd297efd76b38bf6c373530ffa82629\"},\"image\":{\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/users.sch.gr\/chatzipap\/wp-content\/uploads\/2018\/03\/hercules-lernea-ydra.jpg\",\"articleSection\":[\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/users.sch.gr\/chatzipap\/code_reuse_functions\/#respond\"]}]},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/#\/schema\/person\/bcd297efd76b38bf6c373530ffa82629\",\"name\":\"chatzipap\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"http:\/\/0.gravatar.com\/avatar\/318bb065459b1f5c47df938d14d585a7?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/0.gravatar.com\/avatar\/318bb065459b1f5c47df938d14d585a7?s=96&d=mm&r=g\",\"caption\":\"chatzipap\"},\"logo\":{\"@id\":\"http:\/\/users.sch.gr\/chatzipap\/#personlogo\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"http:\/\/users.sch.gr\/chatzipap\/wp-json\/wp\/v2\/posts\/249"}],"collection":[{"href":"http:\/\/users.sch.gr\/chatzipap\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/users.sch.gr\/chatzipap\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/users.sch.gr\/chatzipap\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/users.sch.gr\/chatzipap\/wp-json\/wp\/v2\/comments?post=249"}],"version-history":[{"count":0,"href":"http:\/\/users.sch.gr\/chatzipap\/wp-json\/wp\/v2\/posts\/249\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/users.sch.gr\/chatzipap\/wp-json\/wp\/v2\/media\/252"}],"wp:attachment":[{"href":"http:\/\/users.sch.gr\/chatzipap\/wp-json\/wp\/v2\/media?parent=249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/users.sch.gr\/chatzipap\/wp-json\/wp\/v2\/categories?post=249"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/users.sch.gr\/chatzipap\/wp-json\/wp\/v2\/tags?post=249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}