{"id":293937,"date":"2019-08-28T09:00:49","date_gmt":"2019-08-28T09:00:49","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=293937"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=293937","title":{"rendered":"\u041a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u043d\u0442+: \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0432\u044b\u0434\u0430\u0447\u0438. \u0428\u0440\u0438\u0444\u0442, \u0441\u0442\u0438\u043b\u0438, \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 python"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u00ab\u041a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u043d\u0442+\u00bb \u2014 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u044e\u0440\u0438\u0441\u0442\u043e\u0432, \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u043e\u0432 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e, \u043a\u0430\u043a \u0447\u0430\u0441\u044b. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u044d\u0442\u0438 \u0447\u0430\u0441\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b \u0432 \u0447\u0430\u0441\u0442\u0438 \u0432\u044b\u0434\u0430\u0447\u0438 \u0442\u0435\u043a\u0441\u0442\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e python \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b\u0434\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0430. \u041f\u043e\u043f\u0443\u0442\u043d\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0442\u0435\u043a\u0441\u0442\u0430, \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435.<br \/>   <a name=\"habracut\"><\/a>  <\/p>\n<h3>\u0422\u0435\u043d\u044c \u043d\u0430 \u043f\u043b\u0435\u0442\u0435\u043d\u044c<\/h3>\n<p>  \u041c\u043d\u0435, \u043a\u0430\u043a \u044e\u0440\u0438\u0441\u0442\u0443, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043b\u0433\u043e \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0435\u043c\u0443 \u0441\u043e \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u201c\u041a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u043d\u0442+\u201d, \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0414\u0430\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0430\u0441\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c. \u041f\u0440\u0438 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043d\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0430\u043a\u0442\u0435, \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u0438 \u041a+ \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442 \u043e\u0431\u0437\u043e\u0440 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u0443\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0442\u0435\u043a\u0441\u0442\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/k5\/ya\/w9\/k5yaw9jbfy9aefzvtfzb-dg90he.png\"><\/p>\n<p>  \u0421\u0442\u043e\u043b\u0431\u0435\u0446 \u0441\u043b\u0435\u0432\u0430 \u2013 \u0442\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u043d\u0435\u0435, \u0441\u043f\u0440\u0430\u0432\u0430 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u2013 \u043d\u043e\u0440\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0435\u043f\u0435\u0440\u044c. \u0421\u0435\u0439\u0447\u0430\u0441 (\u043b\u0435\u0442 \u044d\u0434\u0430\u043a n \u043d\u0430\u0437\u0430\u0434) \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0438 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f <b>\u0436\u0438\u0440\u043d\u044b\u043c \u0448\u0440\u0438\u0444\u0442\u043e\u043c<\/b> \u0438 \u0438\u0445 \u0441\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u043d\u043e. \u042d\u0442\u043e \u0432\u0441\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e. \u041d\u043e \u0435\u0441\u0442\u044c \u0438 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u0435 \u0432\u0435\u0449\u0438. <\/p>\n<p>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u043e\u0440\u043c\u044b \u043d\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f, \u0442.\u043a. \u0438\u0445 \u043e\u0431\u044a\u0435\u043c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0432\u0435\u043b\u0438\u043a \u0434\u043b\u044f \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432 \u041a+ \u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0445\u043e\u0434\u0438\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0430\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0432\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0432\u0430 \u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u0432\u0441\u0442\u0430\u0432\u0438\u0432 \u0438\u0445 \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 excel \u0438\u043b\u0438 word-\u0442\u0430\u0431\u043b\u0438\u0446\u0443. <\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u0435\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0442\u0442\u0443\u0434\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u043b\u0438. <\/p>\n<p>  \u0427\u0442\u043e \u0436 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<p>  <b>\u0417\u0430\u0434\u0430\u0447\u0430<\/b>: \u0440\u0430\u0437\u043d\u0435\u0441\u0442\u0438 \u0442\u0435\u043a\u0441\u0442 \u043f\u043e \u0434\u0432\u0443\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c, \u0433\u0434\u0435 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0430 \u0433\u0434\u0435 \u043d\u0435\u0442 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437\u044a\u044f\u0442\u044c \u043d\u043e\u0440\u043c\u0443 \u0438 \u0432\u0441\u0435 \u044d\u0442\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 Excel. \u0417\u0430\u043e\u0434\u043d\u043e, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 python \u0448\u0440\u0438\u0444\u0442, \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0447\u0443\u044e \u043c\u0435\u043b\u043e\u0447\u044c.<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043a\u043e\u0440\u043c\u0438\u043c \u043d\u0430\u0448\u0435\u0439 \u0431\u0443\u0434\u0443\u0449\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435, \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0438\u0437 \u041a+ \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0417\u0430\u043a\u043e\u043d \u00ab\u041e\u0431 \u0410\u041e\u00bb. \u042d\u0442\u043e\u0442 \u0437\u0430\u043a\u043e\u043d \u0447\u0430\u0441\u0442\u043e \u043c\u0435\u043d\u044f\u044e\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0441 \u0447\u0435\u043c \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c txt \u0444\u0430\u0439\u043b\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f.txt). \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0o\/xw\/-t\/0oxw-tin_znk0m2atwnmuazx9na.jpeg\"><\/p>\n<p>   \u0418\u0442\u0430\u043a, \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u043e \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u043f\u043b\u043e\u0448\u043d\u043e\u0439 \u0447\u0435\u0440\u0442\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u043b\u0430 \u0432\u0438\u0434 \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u201c???\u201d. \u0422\u0430\u043a \u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f. \u0412\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>  \u0422\u0430\u043a, \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ph\/qe\/iy\/phqeiyzh_jqmllcnr-a54xe8sq8.jpeg\"><\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u0435\u043b\u043e \u0443\u0441\u0443\u0433\u0443\u0431\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0434\u043b\u0438\u043d\u0435.<\/p>\n<h3>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u041a+.<\/h3>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b consult.py \u0438 \u0432\u043d\u0435\u0441\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u043f\u0435\u0440\u0432\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<pre><code class=\"python\">from __future__ import unicode_literals import codecs import openpyxl<\/code><\/pre>\n<p>  \u041c\u043e\u0434\u0443\u043b\u044c openpyxl \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c, \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 Excel, \u0430 \u0432\u043e\u0442 \u0434\u0432\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u043e\u0432\u044b\u0435. \u0418\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0440\u0443\u0441\u0441\u043a\u0438\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u043c\u0438.<\/p>\n<p>  \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0443\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b excel \u0432\u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043d\u0430\u0437\u0432\u0430\u0432 \u0435\u0433\u043e \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f2.xlsx. \u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0442\u0443\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0448 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b. \u0412 \u0444\u0430\u0439\u043b \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f.txt \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c <\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 excel \u0444\u0430\u0439\u043b, \u0437\u0430\u0445\u043e\u0434\u0438\u0442 \u0432 \u043d\u0435\u0433\u043e:<\/p>\n<pre><code class=\"python\">wb = openpyxl.load_workbook('\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f2.xlsx') sheet=wb.get_active_sheet() x=1 y=0 test=[] test2=[] test3=[]<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0432\u044b\u0448\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c 3 \u043f\u0443\u0441\u0442\u044b\u0445 \u0441\u043f\u0438\u0441\u043a\u0430, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435: test,test2,test3.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u2018\u0430\u2019 \u043c\u044b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043f\u0430\u0441\u0442\u044c\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u0412 y \u2013 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0435\u0440\u0442\u0430. \u041e\u043d\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430 \u043f\u043e \u0434\u043b\u0438\u043d\u0435:<\/p>\n<pre><code class=\"python\">a=('\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435','\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435','\u0410\u0431\u0437\u0430\u0446','\u041f\u0443\u043d\u043a\u0442','\u0421\u0442\u0430\u0442\u044c\u044f','\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435','\u041f\u043e\u0434\u043f\u0443\u043d\u043a\u0442') y='?????????????????????????????????????????????????????????????????????????'<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435.  <\/p>\n<pre><code class=\"python\">with open ('\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f.txt',encoding='cp1251') as f:     lines = (line.strip() for line in f)     for line in lines:         if line.startswith('\u0441\u0442\u0430\u0440\u0430\u044f'):             continue                 col1=line[:35]         col2=line[39:]         col3=line[35:39]         if line.startswith(a):              sheet.cell(row=x, column=1).value=line #\u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f,\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0442.\u043f.             sheet.cell(row=x, column=1).font=ft2             #sheet.cell(row=x, column=1).style='20 % - Accent3'             x+=1 # \u0438\u043b\u0438 x+=2         elif line==None:             continuewith open ('\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f.txt',encoding='cp1251') as f:     lines = (line.strip() for line in f)     for line in lines:         if line.startswith('\u0441\u0442\u0430\u0440\u0430\u044f'):             continue                 col1=line[:35]         col2=line[39:]         col3=line[35:39]         if line.startswith(a):              sheet.cell(row=x, column=1).value=line #\u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f,\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0442.\u043f.                                   x+=1 # \u0438\u043b\u0438 x+=2         elif line==None:             continue<\/code><\/pre>\n<p>   \u041c\u044b \u043e\u0442\u043a\u0440\u044b\u043b\u0438 \u0444\u0430\u0439\u043b \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f.txt \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 cp1251. \u041a\u0430\u0436\u0434\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043e\u0447\u0438\u0441\u0442\u0438\u043b\u0438 \u043e\u0442 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0441 \u043a\u043e\u043d\u0446\u0430 \u0438 \u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u043c strip.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u043b\u043e\u0432\u0430 \u00ab\u0441\u0442\u0430\u0440\u0430\u044f\u00bb \u043c\u044b \u0435\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c. \u0417\u0430\u0447\u0435\u043c \u043d\u0430\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u00ab\u0441\u0442\u0430\u0440\u0430\u044f\u00bb \u0438 \u00ab\u043d\u043e\u0432\u0430\u044f\u00bb, \u044d\u0442\u043e \u0438 \u0442\u0430\u043a \u044f\u0441\u043d\u043e. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0434\u0435\u043b\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443: \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u0438 \u0434\u043e 35 \u0437\u043d\u0430\u043a\u0430 \u0438 \u0441 39 \u0437\u043d\u0430\u043a\u0430 \u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430. \u0422\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043f\u0440\u043e\u0431\u0435\u043b \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lr\/7c\/rv\/lr7crvthi0odk7_1sgw9n2ukvne.jpeg\"><\/p>\n<p>  \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u044b \u0437\u0430\u043d\u043e\u0441\u0438\u043c \u0432 col3, \u0442.\u043a. \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u043d\u0435 \u043f\u0440\u043e\u0431\u0435\u043b, \u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0432\u0441\u043f\u043b\u043e\u0448\u043d\u0443\u044e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/do\/zc\/bm\/dozcbmndg7-epalwt553lwaorpi.jpeg\"><\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u0435\u0441\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f (\u044d\u0442\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0430), \u0442\u043e \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u0438\u0448\u0435\u043c \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 excel \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0434\u0440\u043e\u0431\u043b\u0435\u043d\u0438\u0439 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u2013 x+=1 (\u0438\u043b\u0438 x=x+1).\u041f\u0443\u0441\u0442\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442\u0441\u044f, \u043c\u044b \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c.<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"python\">if len(col2)==0: # \u0447\u0442\u043e\u0431\u044b \u0432 1-\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438 \u043a\u0443\u0441\u043a\u0438 2-\u0433\u043e             if line.startswith(a):                 continue             test2.append(col1)             #test3.append(col1)                 if col3=='    ' and col2!=None:             test.append(line[:35])                     test2.append(line[39:])         if col3!='    ' and line!=y and len(line)&gt;60:             #print(test3)             test3.append(line)          if line==y: # \u043f\u0438\u0448\u0435\u043c \u0432 \u044f\u0447\u0435\u0439\u043a\u0438, \u0447\u0442\u043e \u0441\u043e\u0431\u0440\u0430\u043b\u0438             if test!=None:                 sheet.cell(row=x, column=1).value=(' '.join(test).strip('\\?'))                 sheet.cell(row=x, column=1).font=ft                 sheet.cell(row=x, column=1).alignment=al                 sheet.cell(row=x, column=2).value=(' '.join(test2).strip('\\?'))                 sheet.cell(row=x, column=2).font=ft                 sheet.cell(row=x, column=2).alignment=al                 test=[]                 test2=[]                 x+=1             if len(test3)&gt;0:                 #print(len(test3))                                       sheet.cell(row=x, column=2).value=(' '.join(test3).strip('\\?'))                 sheet.cell(row=x, column=2).font=ft                 sheet.cell(row=x, column=2).alignment=al                 test3=[]                 x+=1             else:                 continue<\/code><\/pre>\n<p>   \u0415\u0441\u043b\u0438 \u0434\u043b\u0438\u043d\u0430 2 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0440\u0430\u0432\u043d\u0430 0, \u0442\u043e \u0435\u0441\u0442\u044c \u0435\u0435 \u043d\u0435\u0442, \u0442\u043e \u0432 test2 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0431\u0435\u043b \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0435\u0441\u0442\u044c, \u0430 \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u0432 test \u0438 test2 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043f\u0435\u0440\u0432\u0430\u044f \u0438 \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>   \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0431\u0435\u043b \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0435\u0441\u0442\u044c, \u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435 \u043f\u0443\u0441\u0442\u0430\u044f \u0438 \u0435\u0435 \u0434\u043b\u0438\u043d\u0430 \u0431\u043e\u043b\u0435\u0435 60 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0442\u043e \u043e\u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 test3.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0430 \u043f\u0443\u0441\u0442\u0430\u044f, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u044b \u043f\u0440\u043e\u0448\u043b\u0438\u0441\u044c \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044e, \u0442\u043e \u043c\u044b \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 excel \u044f\u0447\u0435\u0439\u043a\u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u0441\u043e\u0431\u0440\u0430\u043b\u0438, \u043f\u043e\u043f\u0443\u0442\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044f \u043f\u0443\u0441\u0442\u043e\u0442\u0443 \u0432 test (\u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0431\u044b\u043b \u043d\u0435 \u043f\u0443\u0441\u0442\u043e\u0439) \u0438 \u0434\u043b\u0438\u043d\u0443 test3.<\/p>\n<p>  \u0412 \u043a\u043e\u043d\u0446\u0435, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0444\u0430\u0439\u043b excel:<\/p>\n<pre><code class=\"python\">wb.save('\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f2.xlsx')<\/code><\/pre>\n<p>  <\/p>\n<h3> \u0421\u0442\u0438\u043b\u0438, font \u0438 \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 python<\/h3>\n<p>   \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043a\u0440\u0430\u0441\u043e\u0442\u044b \u0432 \u043d\u0430\u0448\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<p>  \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0432\u044b\u0432\u043e\u0434\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0431\u044b\u043b\u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u044b \u0436\u0438\u0440\u043d\u044b\u043c \u0448\u0440\u0438\u0444\u0442\u043e\u043c, \u0430 \u0441\u0430\u043c \u0442\u0435\u043a\u0441\u0442 \u0431\u044b\u043b \u043f\u043e\u043c\u0435\u043b\u044c\u0447\u0435 \u0438 \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u044f. <br \/>  Python \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043e\u0434 \u0432 \u043c\u0435\u0441\u0442\u0430\u0445, \u0433\u0434\u0435 \u043c\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u0437\u0430\u043f\u0438\u0441\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0432 excel \u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"python\">from openpyxl.styles import Font, Color,NamedStyle, Alignment<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">al= Alignment(horizontal=\"justify\", vertical=\"top\") ft = Font(name='Calibri', size=9) ft2 = Font(name='Calibri', size=9,bold=True)<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">if line.startswith(a):              sheet.cell(row=x, column=1).value=line #\u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f,\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0442.\u043f.             sheet.cell(row=x, column=1).font=ft2<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"python\">if line==y: # \u043f\u0438\u0448\u0435\u043c \u0432 \u044f\u0447\u0435\u0439\u043a\u0438, \u0447\u0442\u043e \u0441\u043e\u0431\u0440\u0430\u043b\u0438             if test!=None:                 sheet.cell(row=x, column=1).value=(' '.join(test).strip('\\?'))                 sheet.cell(row=x, column=1).font=ft                 sheet.cell(row=x, column=1).alignment=al                 sheet.cell(row=x, column=2).value=(' '.join(test2).strip('\\?'))                 sheet.cell(row=x, column=2).font=ft                 sheet.cell(row=x, column=2).alignment=al<\/code><\/pre>\n<pre><code class=\"python\">if len(test3)&gt;0:                 #print(len(test3))                                       sheet.cell(row=x, column=2).value=(' '.join(test3).strip('\\?'))                 sheet.cell(row=x, column=2).font=ft                 sheet.cell(row=x, column=2).alignment=al<\/code><\/pre>\n<p>  \u0422\u043e \u0435\u0441\u0442\u044c, \u043f\u043e \u0441\u0443\u0442\u0438 \u0443 \u043d\u0430\u0441 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b .font \u0438 .alignment.<\/p>\n<p>  \u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u0438\u043d\u044f\u043b\u0430 \u0432\u0438\u0434:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">from __future__ import unicode_literals import codecs import openpyxl from openpyxl.styles import Font, Color,NamedStyle, Alignment \"\"\" 1.\u0438\u0437 \u0444\u0430\u0439\u043b\u0430 Consultant+ \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043e\u0431\u044b\u0447\u043d\u043e\u043c .txt \u0432\u0438\u0434\u0430 ?????????????????????????????????????????????????????????????????????????     \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0443\u043d\u043a\u0442\u0430 15 \u043f\u0443\u043d\u043a\u0442\u0430 1 \u0441\u0442\u0430\u0442\u044c\u0438 48            \u0441\u0442\u0430\u0440\u0430\u044f \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f                       \u043d\u043e\u0432\u0430\u044f \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f      15)    \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u0435    \u0440\u0435\u0448\u0435\u043d\u0438\u0439   \u043e\u0431        15)    \u043f\u0440\u0438\u043d\u044f\u0442\u0438\u0435    \u0440\u0435\u0448\u0435\u043d\u0438\u0439    \u043e \u0434\u0435\u043b\u0430\u0435\u0442 excel \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0434\u0432\u0443\u043c\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u043c\u0438.  \u0432 word \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 - txt \u043d\u0430 \u0432\u0445\u043e\u0434: \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f.txt \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435: \u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f2.xlsx \"\"\"  #file = open ( '\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f2.txt', 'w',encoding='cp1251', newline = '\\n') wb = openpyxl.load_workbook('\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f2.xlsx') sheet=wb.get_active_sheet() x=1 y=0 test=[] test2=[] test3=[] a=('\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435','\u0414\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435','\u0410\u0431\u0437\u0430\u0446','\u041f\u0443\u043d\u043a\u0442','\u0421\u0442\u0430\u0442\u044c\u044f','\u041d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435','\u041f\u043e\u0434\u043f\u0443\u043d\u043a\u0442') y='?????????????????????????????????????????????????????????????????????????'  #\u0441\u0442\u0438\u043b\u0438 \u044f\u0447\u0435\u0435\u043a #al= Alignment(horizontal=\"distributed\", vertical=\"top\") al= Alignment(horizontal=\"justify\", vertical=\"top\") ft = Font(name='Calibri', size=9) ft2 = Font(name='Calibri', size=9,bold=True)  with open ('\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f.txt',encoding='cp1251') as f:     lines = (line.strip() for line in f)     for line in lines:         if line.startswith('\u0441\u0442\u0430\u0440\u0430\u044f'):             continue                 col1=line[:35]         col2=line[39:]         col3=line[35:39]         if line.startswith(a):              sheet.cell(row=x, column=1).value=line #\u0437\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f,\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0438 \u0442.\u043f.             sheet.cell(row=x, column=1).font=ft2             #sheet.cell(row=x, column=1).style='20 % - Accent3'             x+=1 # \u0438\u043b\u0438 x+=2         elif line==None:             continue            #print (line)         #print (len(col2))                  if len(col2)==0: # \u0447\u0442\u043e\u0431\u044b \u0432 1-\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438 \u043a\u0443\u0441\u043a\u0438 2-\u0433\u043e             if line.startswith(a):                 continue             test2.append(col1)             #test3.append(col1)                 if col3=='    ' and col2!=None:             test.append(line[:35])                     test2.append(line[39:])         if col3!='    ' and line!=y and len(line)&gt;60:             #print(test3)             test3.append(line)          if line==y: # \u043f\u0438\u0448\u0435\u043c \u0432 \u044f\u0447\u0435\u0439\u043a\u0438, \u0447\u0442\u043e \u0441\u043e\u0431\u0440\u0430\u043b\u0438             if test!=None:                 sheet.cell(row=x, column=1).value=(' '.join(test).strip('\\?'))                 sheet.cell(row=x, column=1).font=ft                 sheet.cell(row=x, column=1).alignment=al                 sheet.cell(row=x, column=2).value=(' '.join(test2).strip('\\?'))                 sheet.cell(row=x, column=2).font=ft                 sheet.cell(row=x, column=2).alignment=al                 test=[]                 test2=[]                 x+=1             if len(test3)&gt;0:                 #print(len(test3))                                       sheet.cell(row=x, column=2).value=(' '.join(test3).strip('\\?'))                 sheet.cell(row=x, column=2).font=ft                 sheet.cell(row=x, column=2).alignment=al                 test3=[]                 x+=1             else:                 continue          wb.save('\u0440\u0435\u0434\u0430\u043a\u0446\u0438\u044f2.xlsx')<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418\u0442\u0430\u043a, \u0432 \u0438\u0442\u043e\u0433\u0435, \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0444\u0430\u0439\u043b\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439, \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u0437\u0430\u043a\u043e\u043d\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oz\/rf\/hs\/ozrfhsdae84_btpv9ma1ukceirk.jpeg\"><\/p>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u2013 <a href=\"https:\/\/yadi.sk\/d\/ZZtn5V7Ml7mw1Q\">\u0437\u0434\u0435\u0441\u044c<\/a>.<br \/>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u2013 <a href=\"https:\/\/yadi.sk\/d\/VyG8HqhEfcRBzg\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/465229\/\"> https:\/\/habr.com\/ru\/post\/465229\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\u00ab\u041a\u043e\u043d\u0441\u0443\u043b\u044c\u0442\u0430\u043d\u0442+\u00bb \u2014 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u044e\u0440\u0438\u0441\u0442\u043e\u0432, \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u043e\u0432 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e, \u043a\u0430\u043a \u0447\u0430\u0441\u044b. \u0412 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u044d\u0442\u0438 \u0447\u0430\u0441\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b \u0432 \u0447\u0430\u0441\u0442\u0438 \u0432\u044b\u0434\u0430\u0447\u0438 \u0442\u0435\u043a\u0441\u0442\u0430, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e python \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b\u0434\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0430. \u041f\u043e\u043f\u0443\u0442\u043d\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0442\u0435\u043a\u0441\u0442\u0430, \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-293937","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=293937"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/293937\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=293937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=293937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=293937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}