{"id":234,"date":"2019-01-28T08:05:01","date_gmt":"2019-01-28T05:05:01","guid":{"rendered":"http:\/\/myatov.ru\/news\/?p=234"},"modified":"2020-04-24T12:24:07","modified_gmt":"2020-04-24T09:24:07","slug":"bazovye-komandy-python3","status":"publish","type":"post","link":"https:\/\/myatov.ru\/news\/bazovye-komandy-python3\/","title":{"rendered":"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Python3"},"content":{"rendered":"\n<p>\u0417\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435:<br>x, y &#8212; \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0435\u043a\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f,<br>x1\/x2\/x3\/&#8230; &#8212; \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0435\u0433\u043e-\u043b\u0438\u0431\u043e (\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0434\u043b\u044f \u0434\u043e\u043f. \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043a\u0430\u043a \u044d\u0442\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c).<\/p>\n\n\n\n<!--more-->\n\n\n\n<h4 class=\"wp-block-heading\">\u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n\n\n\n<p>isinstance (x, str\/int\/bool\/&#8230;) &#8212; \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<br>callable (x\/len\/callable\/&#8230;) &#8212; \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u043c (\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043e\u043d \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439).<\/p>\n\n\n\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0442\u0438\u043f\u0443 \u0434\u0430\u043d\u043d\u044b\u0445:<br>if not type(X) is str: <br>    quit()<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u0424\u0438\u0447\u0430 \u0441 \u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c<\/h4>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"546\" height=\"186\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/round-1.png\" alt=\"\" class=\"wp-image-355\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/round-1.png 546w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/round-1-300x102.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/round-1-176x60.png 176w\" sizes=\"(max-width: 546px) 100vw, 546px\" \/><figcaption>\u041e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>upper() &#8212; \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b<\/li><li>lower() &#8212; \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b<\/li><li>capitalize() &#8212; \u041f\u0435\u0440\u0432\u0430\u044f \u0431\u0443\u043a\u0432\u0430 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u0430\u044f, \u0434\u0440\u0443\u0433\u0438\u0435 &#8212; \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435<\/li><li>replace() &#8212; \u0437\u0430\u043c\u0435\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438. \u0432 \u0441\u0442\u0440\u043e\u043a\u0435<\/li><li>title() &#8212; \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 &#8212; \u0441 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u044b<\/li><li>dir(&#8216;man&#8217;) &#8212; \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c.<\/li><li>encode() &#8212; \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0431\u0430\u0439\u0442\u044b<\/li><li>startswith() &#8212; \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 (\u0432\u0435\u0440\u043d\u0435\u0442\u0441\u044f true\/false)<\/li><li>endwith() &#8212; \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432<\/li><li>find() &#8212; \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435<\/li><li>&#187; in url &#8212; \u0435\u0441\u0442\u044c \u043b\u0438 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435<\/li><li>help(&#8216;google&#8217;.expandtabs) &#8212; \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0449\u044c \u043e \u0434\u0430\u043d\u043d\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 (\u0435\u0441\u043b\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043a\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u043a\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432 \u043a\u043e\u043d\u0446\u0435 \u043e\u043a\u043d\u0430 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430 \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u043e\u043f. \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0438\u0437 \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0439\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448\u0438 q)<\/li><li>strip() &#8212; \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0441\u043b\u0435\u0432\u0430 \u0438 \u0441\u043f\u0440\u0430\u0432\u0430 \u0443 \u0441\u0442\u0440\u043e\u043a\u0438,<\/li><li>lstrip(), rstrip() &#8212; \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0441\u043b\u0435\u0432\u0430 \u0438 \u0441\u043f\u0440\u0430\u0432\u0430 \u0443 \u0441\u0442\u0440\u043e\u043a\u0438<\/li><li>len() &#8212; \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u0447\u0438\u0441\u043b\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435<\/li><li>\u0442\u0435\u043a\u0441\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u0440\u043e\u0439\u043d\u044b\u0435 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 &#187;&#8217;<\/li><li>X.count(&#8216;Y&#8217;) &#8212; \u043f\u043e\u0434\u0441\u0447\u0435\u0442 \u0447\u0438\u0441\u043b\u0430 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 &#8216;Y&#8217; \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 X.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1024\" height=\"529\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-1-1024x529.png\" alt=\"\" class=\"wp-image-362\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-1-1024x529.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-1-300x155.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-1-768x397.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-1-116x60.png 116w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-1.png 1118w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1024\" height=\"238\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-2-1024x238.png\" alt=\"\" class=\"wp-image-365\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-2-1024x238.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-2-300x70.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-2-768x179.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-2-258x60.png 258w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-2.png 1520w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"419\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-3-1024x419.png\" alt=\"\" class=\"wp-image-369\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-3-1024x419.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-3-300x123.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-3-768x315.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-3-1320x540.png 1320w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-3-146x60.png 146w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-3.png 1616w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>split() &#8212; \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044e \u043f\u0440\u043e\u0431\u0435\u043b<\/li><li>join() &#8212; \u0441\u0446\u0435\u043f\u043b\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0438\u0441\u043a\u0430 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u043c<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"177\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/split-join-1024x177.png\" alt=\"\" class=\"wp-image-385\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/split-join-1024x177.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/split-join-300x52.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/split-join-768x133.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/split-join-347x60.png 347w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/split-join.png 1214w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">\u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>f&#8217;\u0442\u0435\u043a\u0441\u0442{X}\u0442\u0435\u043a\u0441\u0442&#8217; &#8212; \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 Python 3.6 \u0438 \u0432\u044b\u0448\u0435.<\/li><li>&#8216;\u0442\u0435\u043a\u0441\u0442 %s \u0442\u0435\u043a\u0441\u0442&#8217; % X<\/li><li>&#8216;\u0442\u0435\u043a\u0441\u0442 {} \u0442\u0435\u043a\u0441\u0442&#8217;.format(X)<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"736\" height=\"308\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-4.png\" alt=\"\" class=\"wp-image-374\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-4.png 736w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-4-300x126.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/stroki-4-143x60.png 143w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>r&#187;\u0442\u0435\u043a\u0441\u0442 \u0441 \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438&#187; &#8212; \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0442\u0435\u043a\u0441\u0442 \u0441 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0445 \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 (\u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438):<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1014\" height=\"306\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/r-1.png\" alt=\"\" class=\"wp-image-388\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/r-1.png 1014w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/r-1-300x91.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/r-1-768x232.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/r-1-199x60.png 199w\" sizes=\"(max-width: 1014px) 100vw, 1014px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">\u0424\u0438\u0447\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0443\u043b\u0435\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>and() &#8212; \u0437\u0430\u043c\u0435\u043d\u0430 \u0443\u0441\u043b\u043e\u0432\u0438\u044e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 and, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 True, \u043a\u043e\u0433\u0434\u0430 \u0412\u0421\u0415  \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u044e.<\/li><li>any() &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 True, \u043a\u043e\u0433\u0434\u0430 \u0445\u043e\u0442\u044f \u0431\u044b 1 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u044e.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"694\" height=\"704\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/and-any.png\" alt=\"\" class=\"wp-image-381\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/and-any.png 694w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/and-any-296x300.png 296w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/and-any-59x60.png 59w\" sizes=\"(max-width: 694px) 100vw, 694px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">\u0414\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h3>\n\n\n\n<p>range(X1, X2, \u04253) &#8212; \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u04251 \u0434\u043e \u04252 \u0441 \u0448\u0430\u0433\u043e\u043c \u04253.<\/p>\n\n\n\n<p>input(&#8216;\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0425:&#8217;) &#8212; \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0412\u044b\u0432\u043e\u0434<\/h2>\n\n\n\n<p>print (&#8216;something {} calling {}&#8217;.format(&#8216;is&#8217;, 457)) &#8212; \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430<br><br>dir(x) &#8212; \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0441\u0435\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0430\u043d\u0430\u043b\u043e\u0433 print_r<br><br>pprint &#8212; \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0447\u0442\u0435\u043d\u0438\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"371\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/pprint-1024x371.png\" alt=\"\" class=\"wp-image-392\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/pprint-1024x371.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/pprint-300x109.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/pprint-768x278.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/02\/pprint-166x60.png 166w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u0421\u043f\u0438\u0441\u043a\u0438 \u0438 \u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0438<\/h2>\n\n\n\n<p>list.append(&#8216;z&#8217;) &#8212; \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a \u043a\u043e\u043d\u0446\u0443 \u0441\u043f\u0438\u0441\u043a\u0430<br>list.insert(X, &#8216;z&#8217;) &#8212; \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0443\u0436\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0441\u043f\u0438\u0441\u043a\u0430 (X=0 &#8212; \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043f\u0438\u0441\u043a\u0430)<br>list.pop[0] &#8212; \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c 0<br>list.remove(&#8216;value&#8217;) &#8212; \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0441\u043b\u0435\u0432\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f &#8216;value&#8217;<br><\/p>\n\n\n\n<p>dict.update({x: &#8216;x&#8217;}) &#8212; \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043b\u044e\u0447 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430<br>dict.pop(x) &#8212; \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0430<br>dict.get(x) &#8212; \u0432\u0437\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 \u0431\u0435\u0437 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0430<br>dict.keys() &#8212; \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043a\u043b\u044e\u0447\u0435\u0439<br>dict.values() &#8212; \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<br>dict.items() &#8212; \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (for key, value in s.items():)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/tuple-list-dict.png\" class=\"gallery_colorbox\"><img loading=\"lazy\" decoding=\"async\" width=\"1870\" height=\"960\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/tuple-list-dict.png\"  alt=\"\u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445: Tuple, List, Dict.\" class=\"wp-image-239\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/tuple-list-dict.png 1870w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/tuple-list-dict-300x154.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/tuple-list-dict-768x394.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/tuple-list-dict-1024x526.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/tuple-list-dict-117x60.png 117w\" sizes=\"(max-width: 1870px) 100vw, 1870px\" \/><\/a><figcaption>\u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0442\u0438\u043f\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445: Tuple, List, Dict.<\/figcaption><\/figure>\n\n\n\n<p>print (&#8216;some_string&#8217; [0:5]) &#8212; \u0432\u044b\u0432\u0435\u0434\u0435\u0442 some_ &#8212; \u0441\u043b\u0430\u0439\u0441.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>f = [5, 2, 3, 4]<\/li><li>print (f[0:0+2]) &#8212; \u0432\u044b\u0432\u0435\u0434\u0435\u0442 5, 2.<\/li><li>print (f.index[&#8216;5&#8217;]) &#8212; \u0432\u044b\u0432\u0435\u0434\u0435\u0442 0 &#8212; \u043d\u043e\u043c\u0435\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430.<\/li><li>\u0430[-1] = EMPTY_MARK &#8212; \u0432\u043c\u0435\u0441\u0442\u043e \u0446\u0438\u0444\u0440\u044b 4 \u0431\u0443\u0434\u0435\u0442 \u043f\u0443\u0441\u0442\u0430\u044f \u044f\u0447\u0435\u0439\u043a\u0430.<\/li><li>f[0], f[1] = f[1], f[0]      &#8212; f [2, 5, 3, 4] &#8212; \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043c\u0435\u0441\u0442\u0430\u043c\u0438.<\/li><\/ul>\n\n\n\n<p>enumerate(x) &#8212; \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0441\u043f\u0438\u0441\u043a\u0430:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"110\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/enumerate-1024x110.png\" alt=\"\" class=\"wp-image-309\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/enumerate-1024x110.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/enumerate-300x32.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/enumerate-768x82.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/enumerate-560x60.png 560w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/enumerate.png 1716w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430<\/h3>\n\n\n\n<p>\u0421\u043e\u0437\u0434\u0430\u043d \u0434\u043b\u044f \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. <\/p>\n\n\n\n<p>\u0412 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f &#8212; \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b. <\/p>\n\n\n\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043d\u0435\u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u0438 \u043a\u0430\u043a\u043e\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 &#8212; \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e.<\/p>\n\n\n\n<p>set = {x1,x2,&#8230;}<br>type(s)<br>dir (set)<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>s1 &#8212; s2 | \u041c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e<\/li><li>s1.union (s2) | \u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432<\/li><li>s1 and s2 | s1 or s2 | \u0418 \u0442.\u0434. &#8212; \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"552\" height=\"540\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/mnozhestva.png\" alt=\"\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430\" class=\"wp-image-407\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/mnozhestva.png 552w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/mnozhestva-300x293.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/mnozhestva-61x60.png 61w\" sizes=\"(max-width: 552px) 100vw, 552px\" \/><\/figure>\n\n\n\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u0435\u0441\u0442\u044c \u0431\u0430\u0437\u0430 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0440\u044f\u0434 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0441\u043b\u043e\u0432.<\/li><li>\u0435\u0441\u0442\u044c \u0443\u0440\u043b\u044b \u0441\u0430\u0439\u0442\u0430<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">\u0426\u0438\u043a\u043b\u044b<\/h4>\n\n\n\n<p>For, While.<\/p>\n\n\n\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>continue &#8212; \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0438\u0436\u0435 \u0432 \u0446\u0438\u043a\u043b\u0435, \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044e \u0446\u0438\u043a\u043b\u0430<\/li><li>break &#8212; \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0446\u0438\u043a\u043b\u0430.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u041e\u0442\u043b\u043e\u0432 \u043e\u0448\u0438\u0431\u043e\u043a<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">try:<br>    10 \/ 0  #ZeroDivisionError<br>    int('q') #ValueError<br>    10 \/ 's' #TypeError<br>    raise ValueError() #\u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u0448\u0438\u0431\u043a\u0443<br>except ZeroDivisionError as e:<br>    print ('\/0', e)<br>except ValueError:<br>    print ('Wrong Value!')<br>except: #\u043e\u0442\u043b\u043e\u0432 \u043b\u044e\u0431\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438<br>    print ('Error')<br>else: #\u0435\u0441\u043b\u0438 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435 \u0431\u044b\u043b\u043e<br>    print ('Everything is ok!')<br>finally: #\u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430, \u043a\u0430\u043a \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043b\u0438\u0447\u0438\u044f, \u0442\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a<br>    print (\"I'll be back.\")<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u0424\u0443\u043d\u043a\u0446\u0438\u0438<\/h2>\n\n\n\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u044b\u0437\u043e\u0432\u0430.<\/p>\n\n\n\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 &#8212; \u0441\u0432\u043e\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0442.\u0435. \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0435\u0441\u044f \u0432 \u043d\u0435\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u0440\u0430\u0437\u0443 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u044e\u0442\u0441\u044f.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">def function1 (input_x, input_y=5):<br>    print (input_x, input_y)<br>    return input_x + input_y<br><br>sum = function1 (2)<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/function.png\" class=\"gallery_colorbox\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"277\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/function-1024x277.png\"  alt=\"\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 Python\" class=\"wp-image-252\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/function-1024x277.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/function-300x81.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/function-768x208.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/function-222x60.png 222w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/function.png 1662w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>\u041f\u0440\u0438\u043d\u044f\u0442\u0438\u0435 \u0441\u043a\u043e\u043b\u044c \u0443\u0433\u043e\u0434\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0422\u044c\u044e\u043f\u043b)<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/func-2.png\" class=\"gallery_colorbox\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"208\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/func-2-1024x208.png\"  alt=\"\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0441\u043a\u043e\u043b\u044c \u0443\u0433\u043e\u0434\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a)\" class=\"wp-image-256\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/func-2-1024x208.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/func-2-300x61.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/func-2-768x156.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/func-2-296x60.png 296w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2018\/12\/func-2.png 1636w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>\u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0441\u043a\u043e\u043b\u044c \u0443\u0433\u043e\u0434\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a)<\/figcaption><\/figure>\n\n\n\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u043f\u0440\u0438\u0435\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u043d\u0446\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u0440\u0438\u0435\u043c\u0430, \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 function X (x=5, y) &#8212; \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443..<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 &#8212; \u044d\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0441 \u0447\u0438\u0441\u0442\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 (\u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432). \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0442\u0430\u043a\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 &#8212; \u0445\u0430\u0441\u043a\u0438, \u043b\u0438\u0441\u043f, \u044d\u043b\u0435\u043a\u0441\u0438\u0440 \u0438 \u043f\u0440.<\/p><cite>Python &#8212; \u043e\u0431\u044a\u0435\u043a\u0442\u0443-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0424\u0443\u043d\u043a\u0446\u0438\u044f &#8212; \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442.<\/cite><\/blockquote>\n\n\n\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043d\u043e \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0445 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c. \u0418\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 &#8212; \u0435\u0441\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0435\u0451 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043a\u0430\u043a global var, \u0447\u0442\u043e \u043d\u0430\u0440\u0443\u0448\u0430\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430.<\/p>\n\n\n\n<p>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438.<\/p>\n\n\n\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u044b \u0438 \u0432 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#1\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<br><strong>def<\/strong> sum (a, b):<br>    c = a + b<br>    return c<br><br>#2\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<br>sum = <strong>lambda<\/strong> a, b: a + b<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u0420\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0438\u0441\u043a\u0430<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>def maximum_func (*values) &#8212; \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 tuple &#8212; \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<ul><li>maximum_func (1, 3, 5)<\/li><\/ul><\/li><li>\u043d\u043e \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0441\u043f\u0438\u0441\u043e\u043a, \u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u0442 \u0443\u0436\u0435 tuple, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043f\u0438\u0441\u043a\u043e\u043c:<ul><li>values = [1,2,3]<\/li><li>\u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u0438\u0434\u0430: maximum_func(*values)<\/li><\/ul><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"458\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/tuple-unpack-1024x458.png\" alt=\"\" class=\"wp-image-296\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/tuple-unpack-1024x458.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/tuple-unpack-300x134.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/tuple-unpack-768x344.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/tuple-unpack-134x60.png 134w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>args unpack example<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"384\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/kwargs-unpack-1024x384.png\" alt=\"\" class=\"wp-image-298\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/kwargs-unpack-1024x384.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/kwargs-unpack-300x112.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/kwargs-unpack-768x288.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/kwargs-unpack-160x60.png 160w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>kwargs unpack example<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u041a\u043b\u0430\u0441\u0441\u044b<\/h2>\n\n\n\n<p>\u041a\u043b\u0430\u0441\u0441 &#8212; \u044d\u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0430\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b.<\/p>\n\n\n\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0431\u0443\u043a\u0432\u044b. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 &#8212; \u0441 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043a\u043b\u0430\u0441\u0441\u0430 (\u043f\u043e\u043b\u044f).<br>\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438.<br>\u0415\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441, \u043e\u043d\u0430 \u043d\u043e\u0441\u0438\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p><\/blockquote>\n\n\n\n<pre class=\"wp-block-preformatted\">class Door: #\u0444\u0430\u0431\u0440\u0438\u043a\u0430 \u0434\u0432\u0435\u0440\u0435\u0439<br>     name = \"Chief's Cabinet\" <br>     number = 35<br><br>     <code>def open(self, open_by_name): #self is the object        <\/code><br><code>&nbsp;       print('self is', self)<\/code><br><code>&nbsp;       print(open_by_name, ' opened the Door!')<\/code><br><code>&nbsp;       self.open = True<\/code><br><br>d = Door() #\u043e\u0434\u043d\u0443 \u0434\u0432\u0435\u0440\u044c \u043a\u0443\u043f\u0438\u043b\u0438 \u0434\u043e\u043c\u043e\u0439<br>print (d)<br>d.open('Sasha') # equals d.open(self = d), \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u043a\u0443\u043f\u043b\u0435\u043d\u043d\u043e\u0439 \u0434\u0432\u0435\u0440\u0438<br><br>d1 = d<br>d.seat = 'leather' #\u0432\u0432\u0435\u043b\u0438 \u043d\u0435\u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e<br>print (dir(d))<br>print (d1.seat)<br>print (d, d1) #2 \u0440\u0430\u0437\u043d\u044b\u0445 \u0438\u043c\u0435\u043d\u0438 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"656\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/door-1-1024x656.png\" alt=\"\" class=\"wp-image-319\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/door-1-1024x656.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/door-1-300x192.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/door-1-768x492.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/door-1-94x60.png 94w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/door-1.png 1308w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">class Window:<br>     is_opened = False<br>     def open(self):<br>         self.is_opened = not self.is_opened<br>         print('Window is now', self.is_opened)<br> <br> w1 = Window()<br> w2 = Window()<br> print ('Initital state', w1.is_opened, w2.is_opened)<br> <br> w1.open()<br><br> print ('New state', w1.is_opened, w2.is_opened)<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"742\" height=\"740\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/window-1.png\" alt=\"\" class=\"wp-image-322\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/window-1.png 742w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/window-1-150x150.png 150w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/window-1-300x300.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/window-1-60x60.png 60w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u042d\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430.<\/p><\/blockquote>\n\n\n\n<pre class=\"wp-block-preformatted\">class Car:<br>     engine = 'V8 Turbo'<br>     def <strong>init<\/strong>(self):<br>         print ('Constructor is called!')<br>         print ('Self is the object itself!', self)<br>         self.color = 'red'<br> t = Car()<br> t1 = Car()<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"749\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/constructor-1-1024x749.png\" alt=\"\" class=\"wp-image-326\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/constructor-1-1024x749.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/constructor-1-300x219.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/constructor-1-768x562.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/constructor-1-82x60.png 82w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/constructor-1.png 1058w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">1. \u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p><cite>\u0422\u043e \u0435\u0441\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u043f\u043e\u043b\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/cite><\/blockquote>\n\n\n\n<pre class=\"wp-block-preformatted\">class Parent(object): #object \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c<br>     def __<strong>init__<\/strong> (self):<br>         print('Parent inited')<br>         self.value = 'Parent'<br><br>     <code>def do (self):     <\/code><br><code>&nbsp;        print ('Parent do(): {}'.format(self.value))<\/code><br> <br>class Child(Parent):<br>     def __<strong>init__<\/strong>(self):<br>         print('Child inited')<br>         self.value = 'Child'<br><br> parent = Parent()<br> parent.do()<br><br> child = Child()<br> child.do()<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"534\" height=\"184\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/child-parent-1.png\" alt=\"\" class=\"wp-image-329\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/child-parent-1.png 534w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/child-parent-1-300x103.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/child-parent-1-174x60.png 174w\" sizes=\"(max-width: 534px) 100vw, 534px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">\u041f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted\">class Calc(object):<br>     def __<strong>init__<\/strong> (self, number):<br>         self.number = number<br>     <code>def calc_and_print (self):<\/code><br><code>&nbsp;        value = self.calc_value()<\/code><br><code>&nbsp;        self.print_number (value)<\/code><br><br><code>&nbsp;    def calc_value(self):<\/code><br><code>&nbsp;        return self.number * 10 + 2<\/code><br><br><code>&nbsp;    def print_number (self, value_to_print):<\/code><br><code>&nbsp;        print ('------')<\/code><br><code>&nbsp;        print ('Number is', value_to_print)<\/code><br><code>&nbsp;        print ('------')<\/code><br><br> class CalcExtraValue(Calc):<br>     def calc_value(self):<br>         return self.number - 100<br><br> c = CalcExtraValue(3)<br> c.calc_and_print<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"673\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/pereopredelenie-1-1024x673.png\" alt=\"\" class=\"wp-image-331\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/pereopredelenie-1-1024x673.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/pereopredelenie-1-300x197.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/pereopredelenie-1-768x505.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/pereopredelenie-1-91x60.png 91w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/pereopredelenie-1.png 1242w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption>\u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u043d\u0443\u0442\u0440\u0438<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">2. \u0418\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0435\u0435 \u0434\u043b\u044f \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p><\/blockquote>\n\n\n\n<pre class=\"wp-block-preformatted\">class Example(object):<br>     def __<strong>init__<\/strong> (self):<br>         self.a = 1 #\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0437\u0434\u0435 \u0433\u0434\u0435 \u0437\u0430\u0445\u043e\u0442\u0438\u043c<br>         self._b = 2 #\u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043b\u0443\u0447\u0448\u0435 \u0438\u0437\u0432\u043d\u0435 \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c<br>         self.__c = 3 #\u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u0432\u043d\u0435<br>         print ('{} {} {}'.format(self.a, self._b, self.__c))<br><br>     <code>def call (self):<\/code><br><code>&nbsp;        print ('Called!')<\/code><br><br> example = Example()<br> print (example.a)<br> print (example._b)<br><br> try:<br>     print (example.__c)<br> except AttributeError as ex:<br>     print (ex)<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"772\" height=\"808\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/incapsulation-1.png\" alt=\"\" class=\"wp-image-333\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/incapsulation-1.png 772w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/incapsulation-1-287x300.png 287w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/incapsulation-1-768x804.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/incapsulation-1-57x60.png 57w\" sizes=\"(max-width: 772px) 100vw, 772px\" \/><\/figure>\n\n\n\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0441 \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u044f (_name) \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438.<\/p>\n\n\n\n<p>\u041c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0441 \u0434\u0432\u0443\u0445 \u043d\u0438\u0436\u043d\u0438\u0445 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u0438\u0432\u0430\u043d\u0438\u0439 (__name) \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438 \u0442\u0430\u043a\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u043c\u044d\u043d\u0433\u043b\u0438\u043d\u0433 (mangling), \u0434\u0435\u043b\u0430\u044e\u0449\u0438\u0439 \u0435\u0449\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430, \u043d\u0435 \u0434\u0430\u0432\u0430\u044f \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3. \u041f\u043e\u043b\u0438\u043c\u043e\u0440\u0444\u0438\u0437\u043c<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u043f\u0430 \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p><\/blockquote>\n\n\n\n<pre class=\"wp-block-preformatted\">class Parent(object):<br>     def call(self):<br>         print ('parent')<br><br> class Child (Parent):<br>     def call(self):<br>         print ('child')<br><br> class Example(object):<br>     def call(self):<br>         print ('Ex')<br><br> def call_obj(obj):<br> <strong>    obj.call() #\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434 call<br><\/strong><br> call_obj(Child())<br> call_obj(Parent())<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">4. \u0410\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044f<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043f\u0440\u043e\u0449\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0437\u0430\u0434\u0430\u0447.<\/p><\/blockquote>\n\n\n\n<p><strong>\u0412 \u043a\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b?<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u0435\u0441\u043b\u0438 \u0432 \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u0441\u043b\u043e\u0432\u043e global \u0443 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/li><li>\u043a\u043e\u0433\u0434\u0430 \u0432 \u043a\u043e\u0434\u0435 \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u044b, \u0438 \u043d\u0443\u0436\u043d\u043e \u0447\u0430\u0441\u0442\u044c \u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c<\/li><li>\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u043e\u0435, \u0431\u043e\u043b\u0435\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435<\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">Super()<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439.<\/p><cite><br><\/cite><\/blockquote>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1012\" height=\"1024\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/super-1-1012x1024.png\" alt=\"\" class=\"wp-image-339\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/super-1-1012x1024.png 1012w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/super-1-297x300.png 297w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/super-1-768x777.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/super-1-59x60.png 59w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/super-1.png 1194w\" sizes=\"(max-width: 1012px) 100vw, 1012px\" \/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>className.__mro__ &#8212; \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e &#8212; \u0435\u0441\u043b\u0438 \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u0439:<\/p><cite>mro = method resolution object<\/cite><\/blockquote>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"50\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/tuple-1-1024x50.png\" alt=\"\" class=\"wp-image-341\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/tuple-1-1024x50.png 1024w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/tuple-1-300x15.png 300w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/tuple-1-768x38.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/tuple-1-600x29.png 600w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/01\/tuple-1.png 1474w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u0434 \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0430\u0445, \u043f\u0440\u0438 \u0435\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d \u043c\u0435\u0442\u043e\u0434 \u0441\u0430\u043c\u043e\u0433\u043e \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u0412\u044b\u043d\u043e\u0441 \u043a\u043e\u0434\u0430 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b<\/h3>\n\n\n\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 Python-\u0444\u0430\u0439\u043b \u043f\u043e \u0441\u0443\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u043c. \u0412\u0441\u0451, \u0447\u0442\u043e \u0432 \u043d\u0451\u043c \u0435\u0441\u0442\u044c, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043e \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e.<\/p>\n\n\n\n<p>\u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043a\u043e\u0434\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u0438\u0434\u0443\u0449\u0438\u0435 \u0441 Python, \u0442\u0430\u043a\u0430\u044f \u043f\u0430\u043f\u043a\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0439. <\/p>\n\n\n\n<p>\u041f\u0430\u043f\u043a\u0430 \u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0439 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430, \u0438 \u0438\u0437 \u043d\u0435\u0435 \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0431\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043f\u0443\u0442\u0435\u0439 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439.<\/p>\n\n\n\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u043e\u043c \u0444\u0430\u0439\u043b\u0435. \u0414\u0430, \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e \u0436\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u0430\u0445, \u043d\u043e \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u044d\u0442\u043e \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442, \u0442.\u043a. \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043b\u0438\u0448\u044c 1 \u0440\u0430\u0437 \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0447\u0438\u0441\u043b\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n\n\n\n<p>\u0412\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b <a rel=\"noreferrer noopener\" aria-label=\"\u0437\u0434\u0435\u0441\u044c (\u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0435)\" href=\"https:\/\/docs.python.org\/3\/library\/\" target=\"_blank\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n\n\n\n<p>\u0422\u0430\u043a\u0436\u0435, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043c\u043e\u0434\u0443\u043b\u044c, \u043f\u043e \u0441\u0443\u0442\u044c \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0432 \u0435\u0433\u043e \u0432 \u043e\u0431\u044a\u0435\u043a\u0442:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import some_file<br>var1 = some_file.some_function()<br>var2 = some_file.some_var<br><br>from pprint import pprint as pp #\u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0442\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435<br>pp(var1)<br><br>from x_file import * #\u043f\u0440\u043e\u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0451 \u0447\u0442\u043e \u0435\u0441\u0442\u044c<br><\/pre>\n\n\n\n<p>\u0415\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043b\u0435\u0436\u0430\u0449\u0438\u0439 \u0432 \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0435:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0443 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c<\/li><li>\u0432 \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0435 (some_folder) \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0443\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b __init__.py<\/li><li>\u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442: from some_folder import some_script<\/li><li>\u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u043a\u0430\u043a \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443: some_script.some_function()<\/li><li>\u0438\u043b\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a from some_folder.some_script import some_function(), \u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0443\u0436\u0435 \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.<\/li><\/ol>\n\n\n\n<p>if __name__ == &#8216;main&#8217;: #\u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u041d\u0415 \u0432\u044b\u0437\u0432\u0430\u043d \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c \u0444\u0430\u0439\u043b\u043e\u043c.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438<\/h2>\n\n\n\n<p>my_file = open (&#8216;PATH_TO_FILE&#8217;, &#8216;MODE&#8217;, encoding=&#8217;cp1251&#8242;)<br>my_file.close() #\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b<\/p>\n\n\n\n<p>Encoding = \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = UTF-8. <\/p>\n\n\n\n<p>MODE = \u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e = \u0447\u0442\u0435\u043d\u0438\u0435:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>r &#8212; read (\u0447\u0442\u0435\u043d\u0438\u0435)<\/li><li>w &#8212; write (\u0437\u0430\u043f\u0438\u0441\u044c); \u0432\u0441\u0451 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0435\u0440\u0442\u043e \u043f\u0440\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438.<\/li><li>r+ &#8212; \u0447\u0442\u0435\u043d\u0438\u0435 + \u0437\u0430\u043f\u0438\u0441\u044c<\/li><li>a &#8212; append (\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043d\u0435\u0446)<\/li><li>rb &#8212; \u043f\u043e\u0431\u0430\u0439\u0442\u043e\u0432\u043e\u0435 \u0447\u0442\u0435\u043d\u0438\u0435<\/li><li>wb &#8212; \u043f\u043e\u0431\u0430\u0439\u0442\u043e\u0432\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c<\/li><li>wa &#8212; \u043f\u043e\u0431\u0430\u0439\u0442\u043e\u0432\u044b\u0439 append<\/li><\/ul>\n\n\n\n<p>\u041f\u0440\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 \u043a\u0443\u0440\u0441\u043e\u0440 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430 \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0432 0 \u043f\u043e\u0437\u0438\u0446\u0438\u044e, \u0432 \u0441\u0430\u043c\u043e\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u0444\u0430\u0439\u043b\u0430. \u041f\u043e\u0441\u043b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0447\u0442\u0435\u043d\u0438\u044e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043a\u0443\u0440\u0441\u043e\u0440 \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>my_file.tell()   #\u0443\u0437\u043d\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043a\u0443\u0440\u0441\u043e\u0440\u0430<\/li><li>my_file.readline()  #\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u043e\u0438\u0442 \u043a\u0443\u0440\u0441\u043e\u0440<\/li><li>my_file.readlines()   #\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u043e\u043a \u0444\u0430\u0439\u043b\u0430 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u043c \\n.<\/li><\/ul>\n\n\n\n<p>\u0427\u0442\u0435\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0438\u043a\u043b\u0430, \u0442.\u043a. \u0442\u0430\u043a\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u043a\u0430\u0436\u0434\u0443\u044e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0433\u0434\u0430 \u0432\u0435\u0441\u044c \u0444\u0430\u0439\u043b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">for line in my_file:<br>    print (line)<br><\/pre>\n\n\n\n<p><strong>\u041d\u043e \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432<\/strong>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e with:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">with open('FILENAME', 'MODE') as my_file:<br>    for domain in domains:<br>        my_file.write(domain + '\\n')<br><\/pre>\n\n\n\n<p>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u0430 \u043f\u043e\u0431\u0430\u0439\u0442\u043e\u0432\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c? \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">image_url = 'https:\/\/previews-codecanyon.imgix.net\/files\/92185374\/large.png?auto=compress%2Cformat&amp;fit=crop&amp;crop=top&amp;w=590&amp;h=300&amp;s=ac4e862ec4c0aa3112a2890f7d82b554'<br> resp = session.get(image_url)<br><br> with open('image.png', 'wb') as my_file:<br>     my_file.write(resp.content)<br><br> print ('Downloaded!')<\/pre>\n\n\n\n<p><strong>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 csv<\/strong> \u0432 Python \u0435\u0441\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 csv. \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0451, \u0430 \u043c\u043e\u0436\u043d\u043e &#8212; \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#\u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 csv:<br> with open('links.csv', 'w') as my_file:<br>     for position, domain in enumerate(domains, 1):<br>         my_file.write(f'{domain}\\t{position}\\n')<br><br>#\u0447\u0442\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 csv:<br> with open('links.csv', 'r') as my_file:<br>     for line in my_file:<br>         data = line.strip().split('\\t')<br>         domain = data[0]<br>         position = data[1]<br>         print (domain, position)<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 Dump \u0438 Json<\/h3>\n\n\n\n<p>\u0421\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f &#8212; \u044d\u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0432 \u0444\u0430\u0439\u043b, \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u0430 \u0441\u0440\u0430\u0437\u0443 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c.<\/p>\n\n\n\n<p>\u0412 Python \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043e 2 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043c\u043f\u044b \u043f\u0430\u043c\u044f\u0442\u0438 \u0432 \u0444\u0430\u0439\u043b, \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0438\u043c\u043f\u043e\u0440\u0442\u043e\u0432 &#8212; \u044d\u0442\u043e Dump &amp; Json.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"901\" height=\"1024\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/03\/pickle_json-901x1024.png\" alt=\"\" class=\"wp-image-479\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/03\/pickle_json-901x1024.png 901w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/03\/pickle_json-264x300.png 264w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/03\/pickle_json-768x873.png 768w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/03\/pickle_json-53x60.png 53w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/03\/pickle_json.png 1008w\" sizes=\"(max-width: 901px) 100vw, 901px\" \/><\/figure>\n\n\n\n<p><strong>Dump<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u0434\u0435\u043b\u0430\u0435\u0442 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Python \u0444\u0430\u0439\u043b\u044b (\u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438), <\/li><li>\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0430\u0439\u0442\u044b,<\/li><li>\u0438\u043d\u043e\u0433\u0434\u0430 \u0434\u0430\u043c\u043f\u044b \u043c\u043e\u0433\u0443\u0442 \u0434\u0430\u0436\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445,<\/li><li>\u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0430<\/li><\/ul>\n\n\n\n<p><strong>Json:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u0434\u0435\u043b\u0430\u0435\u0442 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0435 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043b\u044e\u0434\u044c\u043c\u0438 \u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u044b, <\/li><li>\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0440\u043e\u043a\u0443,<\/li><li>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0443 \u043f\u043e JavaScript \u0432 json \u0444\u043e\u0440\u043c\u0430\u0442\u0435,<\/li><li>\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432\u0438\u0434\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044c.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439<\/h2>\n\n\n\n<p>\u041c\u043e\u0434\u0443\u043b\u044c OS, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440, \u043f\u0440\u0438\u0437\u0432\u0430\u043d \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441 \u0441\u0430\u043c\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f (os.environ),<\/li><li>\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043f\u0430\u043f\u043a\u0435 (os.getcwd()),<\/li><li>\u0441\u043e\u0437\u0434\u0430\u0442\u044c\/\u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0430\u0439\u043b, <\/li><li>\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0430\u043f\u043a\u0438 (os.listdir()) \u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0451,<\/li><li>\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0447\u0438\u0441\u043b\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u043f\u0430\u043f\u043a\u0435,<\/li><li>\u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0438 \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0430\u043f\u043a\u0435 (os.walk(&#8216;path&#8217;))<\/li><li>\u0438 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e <a rel=\"noreferrer noopener\" aria-label=\"\u0434\u0440\u0443\u0433\u0438\u0445 (\u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0435)\" href=\"https:\/\/docs.python.org\/3\/library\/os.html\" target=\"_blank\">\u0434\u0440\u0443\u0433\u0438\u0445<\/a> \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/li><\/ul>\n\n\n\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 .py \u0432 \u043d\u0430\u0434\u043f\u0430\u043f\u043a\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import os<br><br>    my_folder = os.getcwd() #\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0443\u0442\u044c \u0434\u043e \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043f\u0430\u043f\u043a\u0438<br>    folders = my_folder.split('\/')[:-1] #\u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043f\u0430\u043f\u043a\u0430\u043c\u0438 \u043d\u0430 \u0441\u043b\u043e\u0432\u0430 \u043f\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044e \/, \u0431\u0435\u0440\u0435\u043c \u0441\u043b\u0430\u0439\u0441 \u0441 1 \u043f\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442<br>    upper_folder  = '\/'.join(folders) #\u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u043f\u0430\u043f\u043a\u0430\u043c\u0438 - \u0441 \u0440\u0443\u0442\u043e\u0432\u043e\u0439 \u0434\u043e \u0432\u044b\u0448\u0435 \u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u043d\u0430\u0434 \u0442\u0435\u043a\u0443\u0449\u0435\u0439<br><br>    for filename in os.listdir(upper_folder): #\u0431\u0435\u0440\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043f\u0430\u043f\u043e\u043a \u0432 \u0432\u044b\u0448\u0435\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u043f\u0430\u043f\u043a\u0435<br><br>        <code>if '.py' not in filename: #\u0431\u0435\u0440\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u044b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .py     <\/code><br><code>            continue <\/code><br><br><code>        file_path = upper_folder + '\/' + filename #\u043f\u043e\u043b\u0443\u0447\u0430\u044e \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 <\/code><br><code>        with open(file_path, 'r') as file:<\/code><br><code>            code = file.read()<\/code><br><code>            print (code)<\/code><br><br><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u0411\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u042d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0445\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435.<\/p><p><\/p><cite>\u0414\u0430\u043d\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 (\u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438). \u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043e\u043d\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u044f\u0437\u044b\u043a SQL \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0435 \u0438\u0437-\u0437\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430 \u0434\u0438\u0441\u043a. MySQL, PostgreSQL, SQLite.<br><br>\u0414\u0440\u0443\u0433\u0430\u044f \u0440\u0430\u0437\u043d\u043e\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u044c \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 &#8212; \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043d\u044b\u0435 (noSQL), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0438\u0434\u0430\u0445: &#171;\u043a\u043b\u044e\u0447:\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 &#8212; Redis&#187;, &#171;\u043a\u043b\u044e\u0447:json &#8212; MongoDB&#187;, &#171;\u0433\u0440\u0430\u0444\u044b &#8212; OrientDB&#187; \u0438 \u0442.\u0434.<\/cite><\/blockquote>\n\n\n\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 SQL \u0431\u0430\u0437\u0430\u043c\u0438 \u0432 Python \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0410 \u0435\u0441\u0442\u044c &#8212; \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b ORM (object relational mapping, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0431\u0435\u0437 &#171;\u0433\u043e\u043b\u043e\u0433\u043e&#187; SQL), \u043c\u044b \u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043c\u043e\u0434\u0443\u043b\u044c <strong>sqlalchemy<\/strong>.<\/p>\n\n\n\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0444\u0442 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0421\u0423\u0411\u0414 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <a rel=\"noreferrer noopener\" aria-label=\"Valentino Studio (\u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0435)\" href=\"https:\/\/valentina-db.com\/en\/studio\/download\/current\" target=\"_blank\">Valentino Studio<\/a> (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 MacOS, Linux \u0438 Windows).<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import sqlalchemy as sa #ORM - \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u043e\u043b\u043e\u0432\u043e\u0433\u043e SQL<br><br> metadata = sa.MetaData()<br> connection = {'user': 'USERNAME', 'database': 'DB_NAME', 'host': 'HOST_NAME', 'password': 'PASS_NAME'}<br> dsn = 'postgresql:\/\/{user}:{password}@{host}\/{database}'.format(**connection)<br><br> Book = sa.Table( #\u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 <br>     'books', metadata,<br>     sa.Column('id', sa.Integer, primary_key = True), # \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u044b\u0439 \u043a\u043b\u044e\u0447, \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e<br>     sa.Column('original_id', sa.Integer),<br>     sa.Column('name', sa.String(255)),<br>     sa.Column('description', sa.Text),<br>     sa.Column('book_details', sa.Text),<br>     sa.Column('comments', sa.Text),<br>     sa.Column('pages_num', sa.Integer),<br>     sa.Column('genres', sa.String(255)),<br>     sa.Column('alias', sa.String(255)),<br>     sa.Column('image', sa.String(255)),<br>     sa.Column('date', sa.Date),<br>     sa.Column('processed', sa.Boolean)<br> )<br><br> if <strong>name<\/strong> == '<strong>main<\/strong>':<br>     engine = sa.create_engine(dsn)<br>     #metadata.drop_all(engine)<br>     metadata.create_all(engine)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 API<\/h2>\n\n\n\n<p>\u0412\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0410\u041f\u0418 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e.<\/p>\n\n\n\n<p>\u0415\u0441\u043b\u0438 API \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 Get-\u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u044b API \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">IPython<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>ipython (\u0442\u0430\u043a \u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438) &#8212; <a href=\"https:\/\/en.wikipedia.org\/wiki\/IPython\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Interactive Python (\u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0435)\">Interactive Python<\/a>.<\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">\u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u041f\u043e\u0442\u043e\u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f (thread &#8212; \u043d\u0438\u0442\u044c) &#8212; \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u044f\u0434\u0440\u043e\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041f\u043e\u0442\u043e\u043a \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. <\/p><p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430.<\/p><p>\u041f\u043e\u0442\u043e\u043a\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 (\u0435\u0433\u043e \u043a\u043e\u0434) \u0438 \u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 (\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043d\u0438 \u0438\u043c\u0435\u044e\u0442 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438).<\/p><\/blockquote>\n\n\n\n<p>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 &#8212; \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c, \u0443\u0431\u0438\u0442\u044c \u0438 \u043f\u0440. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0451 id \u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u041f\u043e\u0442\u043e\u043a &#8212; \u0432\u0445\u043e\u0434\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0432. \u0415\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0432 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0438\u0441\u043b\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432.<\/li><li>\u0412 \u043e\u0434\u0438\u043d \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e 1 \u043f\u043e\u0442\u043e\u043a \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u044f\u0434\u0440\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. <\/li><li>\u041f\u043e\u0442\u043e\u043a\u0438 \u043d\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 (\u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u044b \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0430 \u0421).<\/li><\/ul>\n\n\n\n<p>\u0417\u0430 \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0432 Python  \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043c\u043e\u0434\u0443\u043b\u044c <strong>threading<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">from threading import Thread<br><br>def worker1():<br>    while True:<br>        print ('Thread1 working')<br><br>thread1 = Thread(target=worker1)<br>thread1.start()<br> <br>def worker2():<br>    while True:<br>        print ('22222')<br><br>thread2 = Thread(target=worker2)<br>thread2.start()<br><\/pre>\n\n\n\n<p>\u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u0442\u043e\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0438\u0448\u0443\u0442 \u0432 \u0444\u0430\u0439\u043b, \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043a\u043b\u0430\u0434\u043a\u0438 \u0438 \u043d\u0435\u043f\u043e\u0440\u044f\u0434\u043e\u043a. \u0414\u043b\u044f \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435, \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432.<\/p>\n\n\n\n<p>\u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043e\u0447\u0435\u0440\u0435\u0434\u044c\u044e \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043c\u043e\u0434\u0443\u043b\u044c <strong>queue<\/strong> (\u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 = \u043e\u0447\u0435\u0440\u0435\u0434\u044c).<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u043e\u0442\u043e\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u043e\u0447\u0435\u0440\u0435\u0434\u044c\u044e, \u0434\u0440\u0443\u0433\u0438\u0435 \u0436\u0434\u0443\u0442.<\/li><li>\u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">from concurrent.futures import ThreadPoolExecutor<br><br>def work1():<br>    for i in range(10):<br>        print (f'Thread 111 is working {i}')<br> <br>def work2():<br>    for i in range(10):<br>        print (f'Thread 222 is working {i}')<br> <br>executor = ThreadPoolExecutor (max_workers = 10)<br>executor.submit(work1) # \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 1\u0439 \u043f\u043e\u0442\u043e\u043a<br>executor.submit(work2) # \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 2\u0439 \u043f\u043e\u0442\u043e\u043a<br> <br>for i in range (20, 30): # \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 3\u0439 \u043f\u043e\u0442\u043e\u043a<br>    print (i)<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"478\" height=\"1024\" src=\"http:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/03\/workers-1-478x1024.png\" alt=\"\" class=\"wp-image-511\" srcset=\"https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/03\/workers-1-478x1024.png 478w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/03\/workers-1-140x300.png 140w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/03\/workers-1-28x60.png 28w, https:\/\/myatov.ru\/news\/wp-content\/uploads\/2019\/03\/workers-1.png 576w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><figcaption>\u041e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 3\u0445 \u043f\u043e\u0442\u043e\u043a\u043e\u0432<\/figcaption><\/figure>\n\n\n\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c &#8212; \u044d\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u0430\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430 (\u0432\u0441\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0435 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e, \u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c, \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438), \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0432\u043d\u0435\u0434\u0440\u044f\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043c\u0435\u0435\u0442 \u043c\u0435\u0441\u0442\u043e \u0431\u044b\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u0430\u0439\u0442\u0430.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438. \u0412 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043a\u043e\u0433\u0434\u0430 \u0441\u043a\u0440\u0438\u043f\u0442 \u0441\u043f\u0430\u0440\u0441\u0438\u043b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u043d\u0430\u0448\u0435\u043b \u043d\u0430 \u043d\u0435\u0439 \u0425 \u0441\u0441\u044b\u043b\u043e\u043a, \u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0425 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 \u041e\u0447\u0435\u0440\u0435\u0434\u044c.<\/p><p><\/p><\/blockquote>\n\n\n\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0441\u0430\u0439\u0442\u0430 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043a\u043e\u0432:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import random<br>from requests_html import HTMLSession<br>from concurrent.futures import ThreadPoolExecutor<br>from queue import Queue<br><br>scaned_urls = {}<br><br>def worker(queue):<br>    session = HTMLSession()<br>    while queue.qsize() &gt; 0:<br>        try:<br>            url = queue.get()<br>            print ('Send request to', url)<br>            #\u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c timeout=2, \u0442\u043e \u043f\u043e \u0441\u0443\u0442\u0438 \u0443\u0441\u0442\u0440\u043e\u0438\u043c \u0414\u0414\u041e\u0441 \u0441\u0430\u0439\u0442\u0430, - \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0435 2 \u0441\u0435\u043a\u0441\u0443\u043d\u0434\u044b 10 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. <br>            #\u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0443\u0441\u043f\u0435\u0432\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u0439\u0442\u043b \u0443\u0436\u0435 \u043d\u0435 \u043f\u0438\u0448\u0435\u0442\u0441\u044f.<br>            resp = session.get(url, timeout=10) #timeout = 30 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0415\u0441\u043b\u0438 \u043e\u0442\u0432\u0435\u0442 \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 - \u043e\u0448\u0438\u0431\u043a\u0430.<br>            print (resp.html.xpath('\/\/title\/text()')[0])<br>            all_links = resp.html.absolute_links<br>            for u in all_links:<br>                if u in scaned_urls:<br>                    continue<br>                else:<br>                    queue.put(u)<br>                    scaned_urls.add(u)<br>        except:<br>            pass<br><br>def main():<br>    qu = Queue()<br>    url = 'http:\/\/myatov.ru\/news\/'<br>    session = HTMLSession()<br>    resp = session.get(url)<br><br>    <code>for u in resp.html.absolute_links: #\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0441\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b       <\/code><br><code>        qu.put(u) <\/code><br><br><code>    print ('Queue size', qu.qsize()) <\/code><br><br><code>    with ThreadPoolExecutor(max_workers=10) as ex:<\/code><br><code>        for _ in range(10): #\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432 10 \u043f\u043e\u0442\u043e\u043a\u043e\u0432<\/code><br><code>        ex.submit(worker, qu)<\/code><br><code>        #ex.map \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0436\u0438\u0437\u043d\u044c<\/code><br><br> main()<br><\/pre>\n\n\n\n<p>\u041c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u041e\u0431\u0443\u0447\u0430\u044e\u0449\u0435\u0435 \u0432\u0438\u0434\u0435\u043e Python<\/h2>\n\n\n\n<p>\u041f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043b \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432\u044b\u0448\u0435 \u043e \u041f\u0430\u0439\u0442\u043e\u043d\u0435 \u0432 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0438\u0439 \u0432\u0438\u0434\u0435\u043e \u0440\u043e\u043b\u0438\u043a.<\/p>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Python - \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438 \u0434\u043e \u043c\u043d\u043e\u0433\u043e\u043f\u043e\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438\" width=\"925\" height=\"520\" src=\"https:\/\/www.youtube.com\/embed\/pAfl-7SIRjM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n<!-- iShare buttons -->\r\n<div data-description=\"\u0417\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435:x, y &amp;#8212; \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0435\u043a\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f,x1\/x2\/x3\/&amp;#8230; &amp;#8212; \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0435\u0433\u043e-\u043b\u0438\u0431\u043e (\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0434\u043b\u044f \u0434\u043e\u043f. \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043a\u0430\u043a ...\"  data-title=\"\u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Python3\"  data-url=\"https:\/\/myatov.ru\/news\/bazovye-komandy-python3\/\"  class=\"it-share-2789449b6b8a68b687d31479b208c596-234_2 horizontal center\"><\/div><script type=\"text\/javascript\" async charset=\"utf-8\" src=\"\/\/share.itraffic.su\/share.js?buttons=vk,ok,fb,tw,gg,bm&size=big&theme=1&align=center&direction=horizontal&key=2789449b6b8a68b687d31479b208c596-234_2\"><\/script>\r\n<!-- \/iShare buttons -->","protected":false},"excerpt":{"rendered":"<p>\u0417\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435:x, y &#8212; \u043e\u0431\u044a\u0435\u043a\u0442, \u043d\u0435\u043a\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f,x1\/x2\/x3\/&#8230; &#8212; \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0447\u0435\u0433\u043e-\u043b\u0438\u0431\u043e (\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0434\u043b\u044f \u0434\u043e\u043f. \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043a\u0430\u043a \u044d\u0442\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c).<\/p>\n","protected":false},"author":1,"featured_media":349,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[62],"tags":[61],"class_list":["post-234","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming","tag-python"],"_links":{"self":[{"href":"https:\/\/myatov.ru\/news\/wp-json\/wp\/v2\/posts\/234"}],"collection":[{"href":"https:\/\/myatov.ru\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myatov.ru\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myatov.ru\/news\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myatov.ru\/news\/wp-json\/wp\/v2\/comments?post=234"}],"version-history":[{"count":124,"href":"https:\/\/myatov.ru\/news\/wp-json\/wp\/v2\/posts\/234\/revisions"}],"predecessor-version":[{"id":701,"href":"https:\/\/myatov.ru\/news\/wp-json\/wp\/v2\/posts\/234\/revisions\/701"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/myatov.ru\/news\/wp-json\/wp\/v2\/media\/349"}],"wp:attachment":[{"href":"https:\/\/myatov.ru\/news\/wp-json\/wp\/v2\/media?parent=234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myatov.ru\/news\/wp-json\/wp\/v2\/categories?post=234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myatov.ru\/news\/wp-json\/wp\/v2\/tags?post=234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}