{"id":7080,"date":"2026-09-26T11:00:42","date_gmt":"2026-09-26T07:30:42","guid":{"rendered":"https:\/\/parmin.cloud\/blog\/?p=7080"},"modified":"2026-09-26T11:00:42","modified_gmt":"2026-09-26T07:30:42","slug":"%d9%86%d8%ad%d9%88%d9%87-%d8%ad%d8%b0%d9%81-%da%a9%d8%a7%d8%b1%d8%a7%da%a9%d8%aa%d8%b1%d9%87%d8%a7-%d8%a7%d8%b2-%d8%b1%d8%b4%d8%aa%d9%87-%d8%af%d8%b1-%d9%be%d8%a7%db%8c%d8%aa%d9%88%d9%86","status":"publish","type":"post","link":"https:\/\/parmin.cloud\/blog\/%d9%86%d8%ad%d9%88%d9%87-%d8%ad%d8%b0%d9%81-%da%a9%d8%a7%d8%b1%d8%a7%da%a9%d8%aa%d8%b1%d9%87%d8%a7-%d8%a7%d8%b2-%d8%b1%d8%b4%d8%aa%d9%87-%d8%af%d8%b1-%d9%be%d8%a7%db%8c%d8%aa%d9%88%d9%86\/","title":{"rendered":"\u0646\u062d\u0648\u0647 \u062d\u0630\u0641 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627 \u0627\u0632 \u0631\u0634\u062a\u0647 \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u0645\u0642\u062f\u0645\u0647<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0628\u0631\u0627\u06cc \u062d\u0630\u0641 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627 \u0627\u0632 \u0631\u0634\u062a\u0647\u200c\u0627\u06cc \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646\u060c \u0628\u0627\u06cc\u062f \u0631\u0634\u062a\u0647 \u062c\u062f\u06cc\u062f\u06cc \u0628\u0633\u0627\u0632\u06cc\u062f\u061b \u0686\u0648\u0646 \u0627\u0634\u06cc\u0627\u06cc <code>str<\/code> Immutable \u0647\u0633\u062a\u0646\u062f. \u0627\u0632 <code>str.replace()<\/code> \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u06cc\u0627 \u0632\u06cc\u0631\u0631\u0634\u062a\u0647\u061b \u0627\u0632 <code>str.translate()<\/code> \u06cc\u0627 <code>str.maketrans()<\/code> \u0628\u0631\u0627\u06cc \u062d\u0630\u0641 \u0686\u0646\u062f \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u062f\u0631 \u06cc\u06a9 \u06af\u0630\u0631\u061b \u0627\u0632 <code>re.sub()<\/code> \u0628\u0631\u0627\u06cc \u062d\u0630\u0641 \u0645\u0628\u062a\u0646\u06cc \u0628\u0631 \u0627\u0644\u06af\u0648\u061b \u0648 \u0627\u0632 Slicing \u0648\u0642\u062a\u06cc \u0644\u0627\u0632\u0645 \u0627\u0633\u062a \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627 \u0631\u0627 \u062f\u0631 \u0627\u0628\u062a\u062f\u0627\u060c \u0627\u0646\u062a\u0647\u0627 \u06cc\u0627 Index \u0645\u0634\u062e\u0635\u06cc \u062d\u0630\u0641 \u06a9\u0646\u06cc\u062f\u060c \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0627\u06cc\u0646 tutorial \u0647\u0631 \u0631\u0648\u06cc\u06a9\u0631\u062f \u0631\u0627 \u0628\u0627 \u0645\u062b\u0627\u0644\u0647\u0627\u06cc \u0642\u0627\u0628\u0644 \u0627\u062c\u0631\u0627 \u062f\u0631 \u06a9\u0646\u0633\u0648\u0644 \u062a\u0639\u0627\u0645\u0644\u06cc \u067e\u0627\u06cc\u062a\u0648\u0646 \u0645\u0631\u0648\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0628\u0631\u0627\u06cc \u067e\u0627\u06a9\u200c\u0633\u0627\u0632\u06cc\u0650 \u0641\u0642\u0637-Whitespace\u060c \u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u00ab\u062d\u0630\u0641 \u0641\u0627\u0635\u0644\u0647\u200c\u0647\u0627 \u0627\u0632 \u0631\u0634\u062a\u0647 \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646\u00bb \u0631\u0627 \u0628\u0628\u06cc\u0646\u06cc\u062f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646\u200c\u0647\u0627\u06cc \u067e\u0627\u06cc\u062a\u0648\u0646\u06cc\u200c\u062a\u0627\u0646 \u0631\u0627 \u0627\u0632 \u06af\u06cc\u062a\u200c\u0647\u0627\u0628 \u0631\u0648\u06cc \u067e\u0644\u062a\u0641\u0631\u0645 \u0627\u067e \u067e\u0627\u0631\u0645\u06cc\u0646 \u06a9\u0644\u0648\u062f \u062f\u06cc\u067e\u0644\u0648\u06cc \u06a9\u0646\u06cc\u062f \u0648 \u0645\u0642\u06cc\u0627\u0633\u200c\u067e\u0630\u06cc\u0631\u06cc \u0648 \u0645\u062f\u06cc\u0631\u06cc\u062a \u0632\u06cc\u0631\u0633\u0627\u062e\u062a \u0631\u0627 \u0628\u0647 \u067e\u0627\u0631\u0645\u06cc\u0646 \u06a9\u0644\u0648\u062f \u0628\u0633\u067e\u0627\u0631\u06cc\u062f.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0646\u06a9\u0627\u062a \u06a9\u0644\u06cc\u062f\u06cc<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0631\u0634\u062a\u0647\u200c\u0647\u0627\u06cc \u067e\u0627\u06cc\u062a\u0648\u0646 Immutable \u0647\u0633\u062a\u0646\u062f:<\/strong> \u0647\u0631 \u062d\u0630\u0641\u06cc \u0631\u0634\u062a\u0647 \u062c\u062f\u06cc\u062f\u06cc \u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u062f\u061b \u0631\u0634\u062a\u0647 \u0627\u0635\u0644\u06cc \u0628\u062f\u0648\u0646 \u062a\u063a\u06cc\u06cc\u0631 \u0645\u06cc\u200c\u0645\u0627\u0646\u062f.<\/li>\n\n\n\n<li>\u0627\u0632 <code>replace(old, '')<\/code> \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u06cc\u0627 \u0632\u06cc\u0631\u0631\u0634\u062a\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f\u061b \u0622\u0631\u06af\u0648\u0645\u0627\u0646 \u0633\u0648\u0645\u06cc \u067e\u0627\u0633 \u0628\u062f\u0647\u06cc\u062f \u062a\u0627 \u062a\u0639\u062f\u0627\u062f \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646\u06cc\u200c\u0647\u0627 \u0645\u062d\u062f\u0648\u062f \u0634\u0648\u062f.<\/li>\n\n\n\n<li>\u0627\u0632 <code>translate()<\/code> \u0628\u0627 <code>str.maketrans('', '', chars)<\/code> \u06cc\u0627 Dict \u0646\u06af\u0627\u0634\u062a \u0628\u0631\u0627\u06cc \u062d\u0630\u0641 \u0686\u0646\u062f \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u062f\u0631 \u06cc\u06a9 \u06af\u0630\u0631 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/li>\n\n\n\n<li>\u0627\u0632 <code>re.sub()<\/code> \u0648\u0642\u062a\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u062d\u0630\u0641 \u0628\u0647 \u0627\u0644\u06af\u0648 \u0648\u0627\u0628\u0633\u062a\u0647 \u0627\u0633\u062a (\u0627\u0631\u0642\u0627\u0645\u060c \u0639\u0644\u0627\u0626\u0645 \u0646\u06af\u0627\u0631\u0634\u06cc\u060c \u063a\u06cc\u0631-ASCII).<\/li>\n\n\n\n<li>\u0627\u0632 Slicing \u06cc\u0639\u0646\u06cc (<code>s[1:]<\/code>\u060c <code>s[:-1]<\/code>\u060c <code>s[:i] + s[i+1:]<\/code>) \u0628\u0631\u0627\u06cc \u062d\u0630\u0641 \u0627\u0648\u0644\u06cc\u0646\u060c \u0622\u062e\u0631\u06cc\u0646 \u06cc\u0627 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 Index-\u0634\u062f\u0647\u2014\u0628\u062f\u0648\u0646 \u0627\u0633\u06a9\u0646 \u06a9\u0644 \u0631\u0634\u062a\u0647\u2014\u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/li>\n\n\n\n<li><code>strip()<\/code>\u060c <code>lstrip()<\/code> \u0648 <code>rstrip()<\/code> \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627\u06cc \u0627\u0628\u062a\u062f\u0627\u06cc\u06cc \u06cc\u0627 \u0627\u0646\u062a\u0647\u0627\u06cc\u06cc (\u0627\u063a\u0644\u0628 Whitespace) \u0631\u0627 \u062d\u0630\u0641 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f\u061b \u0646\u0647 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627\u06cc \u062f\u0644\u062e\u0648\u0627\u0647 \u062f\u0631 \u0648\u0633\u0637.<\/li>\n\n\n\n<li>\u0644\u06cc\u0633\u062a\u0647\u0627 <code>remove()<\/code> \u062f\u0627\u0631\u0646\u062f\u061b \u0631\u0634\u062a\u0647\u200c\u0647\u0627 \u0646\u0647\u2014\u0635\u062f\u0627 \u0632\u062f\u0646 <code>remove()<\/code> \u0631\u0648\u06cc \u0631\u0634\u062a\u0647\u060c AttributeError \u067e\u0631\u062a\u0627\u0628 \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u0646\u062d\u0648\u0647 \u0627\u0646\u062a\u062e\u0627\u0628 \u0631\u0648\u0634 \u062d\u0630\u0641<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u0631\u0648\u0634<\/th><th>\u0645\u0646\u0627\u0633\u0628 \u0628\u0631\u0627\u06cc<\/th><th>\u0645\u062d\u062f\u0648\u062f\u06cc\u062a<\/th><\/tr><\/thead><tbody><tr><td>replace()<\/td><td>\u06cc\u06a9 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u06cc\u0627 \u0632\u06cc\u0631\u0631\u0634\u062a\u0647\u061b Literal\u0647\u0627\u06cc \u0633\u0627\u062f\u0647<\/td><td>\u0686\u0646\u062f \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0645\u062e\u062a\u0644\u0641\u060c \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc\u0647\u0627\u06cc \u0632\u0646\u062c\u06cc\u0631\u0647\u0627\u06cc \u06cc\u0627 \u062d\u0644\u0642\u0647 \u0644\u0627\u0632\u0645 \u062f\u0627\u0631\u062f<\/td><\/tr><tr><td>translate() \/ maketrans()<\/td><td>\u0686\u0646\u062f\u06cc\u0646 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0645\u062a\u0645\u0627\u06cc\u0632 \u0647\u0645\u200c\u0632\u0645\u0627\u0646<\/td><td>\u0628\u0631\u0627\u06cc \u0627\u0644\u06af\u0648\u0647\u0627\u06cc \u067e\u06cc\u0686\u06cc\u062f\u0647 \u06a9\u0645\u062a\u0631 \u062e\u0648\u0627\u0646\u0627\u0633\u062a<\/td><\/tr><tr><td>re.sub()<\/td><td>\u0627\u0631\u0642\u0627\u0645\u060c \u06a9\u0644\u0627\u0633\u0647\u0627\u06cc \u0639\u0644\u0627\u0626\u0645 \u0646\u06af\u0627\u0631\u0634\u06cc\u060c \u0642\u0648\u0627\u0646\u06cc\u0646 Regex<\/td><td>\u0628\u0631\u0627\u06cc \u06cc\u06a9 Literal \u0645\u0646\u0641\u0631\u062f \u0627\u0632 replace() \u06a9\u0646\u062f\u062a\u0631 \u0627\u0633\u062a<\/td><\/tr><tr><td>Slicing<\/td><td>\u062d\u0630\u0641 \u0645\u0628\u062a\u0646\u06cc \u0628\u0631 \u0627\u0648\u0644\u06cc\u0646\u060c \u0622\u062e\u0631\u06cc\u0646 \u06cc\u0627 Index<\/td><td>\u0628\u0631\u0627\u06cc \u00ab\u062d\u0630\u0641 \u0647\u0645\u0647\u0654 a\u0647\u0627\u00bb \u062f\u0631 \u0633\u0631\u0627\u0633\u0631 \u0631\u0634\u062a\u0647 \u0646\u06cc\u0633\u062a<\/td><\/tr><tr><td>strip() \/ lstrip() \/ rstrip()<\/td><td>\u0622\u0634\u063a\u0627\u0644\u0647\u0627\u06cc \u0627\u0628\u062a\u062f\u0627 \u06cc\u0627 \u0627\u0646\u062a\u0647\u0627 (\u0641\u0627\u0635\u0644\u0647\u200c\u0647\u0627\u060c n)<\/td><td>\u0628\u0647 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627\u06cc \u0648\u0633\u0637 \u062f\u0633\u062a \u0646\u0645\u06cc\u200c\u0632\u0646\u062f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u062d\u0630\u0641 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627 \u0628\u0627 replace()<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>str.replace()<\/code> \u06a9\u067e\u06cc\u0627\u06cc \u0627\u0632 \u0631\u0634\u062a\u0647 \u0631\u0627\u2014which \u0647\u0631 \u0645\u0648\u0631\u062f \u0627\u0632 \u0622\u0631\u06af\u0648\u0645\u0627\u0646 \u0627\u0648\u0644 \u0628\u0627 \u0622\u0631\u06af\u0648\u0645\u0627\u0646 \u062f\u0648\u0645 \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646 \u0634\u062f\u0647\u2014\u0628\u0631\u0645\u06cc\u200c\u06af\u0631\u062f\u0627\u0646\u062f. \u0631\u0634\u062a\u0647 \u062e\u0627\u0644\u06cc \u0631\u0627 \u0628\u0647\u200c\u0639\u0646\u0648\u0627\u0646 \u0622\u0631\u06af\u0648\u0645\u0627\u0646 \u062f\u0648\u0645 \u067e\u0627\u0633 \u0628\u062f\u0647\u06cc\u062f \u062a\u0627 \u0645\u0648\u0627\u0631\u062f \u0645\u0637\u0627\u0628\u0642\u062a \u062d\u0630\u0641 \u0634\u0648\u0646\u062f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0631\u0634\u062a\u0647 \u0646\u0645\u0648\u0646\u0647\u200c\u0627\u06cc \u062a\u0639\u0631\u06cc\u0641 \u06a9\u0646\u06cc\u062f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>s = 'abc12321cba'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0647\u0631 a \u0631\u0627 \u062d\u0630\u0641 \u06a9\u0646\u06cc\u062f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>print(s.replace('a', ''))<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u062e\u0631\u0648\u062c\u06cc:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Output\nbc12321cb<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0647\u0631 \u062f\u0648 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 a \u062d\u0630\u0641 \u0634\u062f\u0647\u200c\u0627\u0646\u062f\u061b \u0631\u0634\u062a\u0647 \u0627\u0635\u0644\u06cc s \u0647\u0645\u0686\u0646\u0627\u0646 &#8216;abc12321cba&#8217; \u0627\u0633\u062a.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u062d\u0630\u0641 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627\u06cc \u062e\u0637 \u062c\u062f\u06cc\u062f<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>s = 'ab\\ncd\\nef'\nprint(s.replace('\\n', ''))<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Output\nabcdef<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u062d\u0630\u0641 \u06cc\u06a9 \u0632\u06cc\u0631\u0631\u0634\u062a\u0647<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>print('Helloabc'.replace('Hello', ''))<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Output\nabc<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u0645\u062d\u062f\u0648\u062f \u06a9\u0631\u062f\u0646 \u062a\u0639\u062f\u0627\u062f \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646\u06cc\u200c\u0647\u0627<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u0622\u0631\u06af\u0648\u0645\u0627\u0646 \u0627\u062e\u062a\u06cc\u0627\u0631\u06cc \u0633\u0648\u0645\u060c \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646\u06cc\u200c\u0647\u0627 \u0631\u0627 \u0645\u062d\u062f\u0648\u062f \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>print('abababab'.replace('a', 'A', 2))<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Output\nAbAbabab<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0641\u0642\u0637 \u062f\u0648 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 a \u0627\u0648\u0644 \u062a\u063a\u06cc\u06cc\u0631 \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. \u0628\u0631\u0627\u06cc \u062c\u0632\u0626\u06cc\u0627\u062a \u0628\u06cc\u0634\u062a\u0631\u060c \u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u00ab\u0645\u062a\u062f replace() \u0631\u0634\u062a\u0647 \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646\u00bb \u0631\u0627 \u062f\u0631 \u067e\u0627\u0631\u0645\u06cc\u0646 \u06a9\u0644\u0648\u062f \u0628\u0628\u06cc\u0646\u06cc\u062f.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u062d\u0630\u0641 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627 \u0628\u0627 translate()<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>str.translate()<\/code> \u0647\u0631 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0631\u0627\u2014from \u0637\u0631\u06cc\u0642 \u062c\u062f\u0648\u0644\u06cc\u2014\u0646\u06af\u0627\u0634\u062a \u0645\u06cc\u200c\u06a9\u0646\u062f. \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627\u06cc \u0646\u0627\u062e\u0648\u0627\u0633\u062a\u0647 \u0631\u0627 \u0628\u0647 <code>None<\/code> \u0646\u06af\u0627\u0634\u062a \u06a9\u0646\u06cc\u062f (\u06cc\u0627 \u0627\u0632 <code>str.maketrans<\/code> \u0628\u0627 \u0645\u062c\u0645\u0648\u0639\u0647 \u062d\u0630\u0641 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f) \u062a\u0627 \u062d\u0630\u0641 \u0634\u0648\u0646\u062f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0647\u0631 b \u0631\u0627 \u062d\u0630\u0641 \u06a9\u0646\u06cc\u062f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>s = 'abc12321cba'\nprint(s.translate({ord('b'): None}))<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Output\nac12321ca<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u062d\u0630\u0641 \u0686\u0646\u062f \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u062f\u0631 \u06cc\u06a9 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>print(s.translate({ord(i): None for i in 'abc'}))<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Output\n12321<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0647\u0645\u06cc\u0646 Idiom \u0628\u0631\u0627\u06cc \u062e\u0637\u0647\u0627\u06cc \u062c\u062f\u06cc\u062f \u0647\u0645 \u06a9\u0627\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>print('ab\\ncd\\nef'.translate({ord('\\n'): None}))<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Output\nabcdef<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>str.maketrans('', '', ',!')<\/code> \u062c\u062f\u0648\u0644\u0650 \u0641\u0642\u0637-\u062d\u0630\u0641\u06cc \u0645\u06cc\u200c\u0633\u0627\u0632\u062f \u06a9\u0647 \u0627\u063a\u0644\u0628 \u0627\u0632 Dict Comprehension \u062e\u0648\u0627\u0646\u0627\u062a\u0631 \u0627\u0633\u062a:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>string = \"Hello, World!\"\nprint(string.translate(str.maketrans(\"\", \"\", \",!\")))\n# Hello World<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u062d\u0630\u0641 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627 \u0628\u0627 \u0639\u0628\u0627\u0631\u0627\u062a \u0628\u0627\u0642\u0627\u0639\u062f\u0647<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>re.sub()<\/code> \u0648\u0642\u062a\u06cc \u0645\u06cc\u200c\u062e\u0634\u062f \u06a9\u0647 \u0642\u0627\u0646\u0648\u0646\u060c \u0627\u0644\u06af\u0648\u06cc\u06cc \u0628\u0627\u0634\u062f\u2014not Literal \u062b\u0627\u0628\u062a\u06cc. \u0627\u0648\u0644 <code>re<\/code> \u0631\u0627 Import \u06a9\u0646\u06cc\u062f.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u062d\u0630\u0641 \u0627\u0631\u0642\u0627\u0645<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>import re\n\ntext = \"Hello123 World456\"\nprint(re.sub(r'\\d+', '', text))\n# Hello World<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u062d\u0630\u0641 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627\u06cc \u063a\u06cc\u0631-\u0627\u0644\u0641\u0628\u0627\u06cc\u06cc-\u0639\u062f\u062f\u06cc<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>print(re.sub(r'&#91;^a-zA-Z0-9]', '', \"Hello, World! 123\"))\n# HelloWorld123<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u062d\u0630\u0641 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627\u06cc \u063a\u06cc\u0631-ASCII<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>raw = 'Caf\u00e9 r\u00e9sum\u00e9'\nprint(re.sub(r'&#91;^\\x00-\\x7F]+', '', raw))\n# Caf rsum<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0628\u0631\u0627\u06cc \u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0645\u062a\u0645\u0631\u06a9\u0632 \u0631\u0648\u06cc \u0633\u06cc\u0646\u062a\u06a9\u0633 \u0627\u0644\u06af\u0648\u060c \u00ab\u0639\u0628\u0627\u0631\u0627\u062a \u0628\u0627\u0642\u0627\u0639\u062f\u0647 \u067e\u0627\u06cc\u062a\u0648\u0646\u00bb \u0631\u0627 \u062f\u0631 \u067e\u0627\u0631\u0645\u06cc\u0646 \u06a9\u0644\u0648\u062f \u0628\u0628\u06cc\u0646\u06cc\u062f.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u062d\u0630\u0641 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627 \u0628\u0627 Slicing \u0648 Comprehension<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Slicing \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627 \u0631\u0627 \u0628\u0631 \u0627\u0633\u0627\u0633 \u0645\u0648\u0642\u0639\u06cc\u062a\u2014\u0628\u062f\u0648\u0646 \u062c\u0633\u062a\u062c\u0648\u06cc \u06a9\u0644 \u0631\u0634\u062a\u0647\u2014\u062d\u0630\u0641 \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>s = \"Hello, World!\"\nprint(s&#91;1:])    # ello, World!  \u2014 \u062d\u0630\u0641 \u0627\u0648\u0644\u06cc\u0646 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\nprint(s&#91;:-1])   # Hello, World  \u2014 \u062d\u0630\u0641 \u0622\u062e\u0631\u06cc\u0646 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\n\ni = 4\nprint(s&#91;:i] + s&#91;i+1:])  # Hell, World! \u2014 \u062d\u0630\u0641 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u062f\u0631 index \u06cc\u0639\u0646\u06cc i<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>List Comprehension<\/strong> (\u06cc\u0627 Generator \u062f\u0631\u0648\u0646 join) \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627 \u0631\u0627 \u0641\u06cc\u0644\u062a\u0631 \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vowels = 'aeiouAEIOU'\nprint(''.join(c for c in 'hello world' if c not in vowels))\n# hll wrld<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u06a9\u0627\u0631\u0627\u06cc\u06cc \u0631\u0648\u06cc \u0631\u0634\u062a\u0647\u200c\u0647\u0627\u06cc \u0628\u0632\u0631\u06af<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u062f\u0631 \u0631\u0634\u062a\u0647 \u062a\u0633\u062a\u06cc \u06cc\u06a9-\u0645\u06cc\u0644\u06cc\u0648\u0646-\u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u06cc (\u067e\u0627\u06cc\u062a\u0648\u0646 3.12\u060c \u0627\u062c\u0631\u0627\u06cc \u0645\u062d\u0644\u06cc)\u060c \u0632\u0645\u0627\u0646\u0628\u0646\u062f\u06cc\u0647\u0627\u06cc \u062a\u0642\u0631\u06cc\u0628\u06cc \u0627\u06cc\u0646 \u0628\u0648\u062f:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u06a9\u0627\u0631<\/th><th>\u0633\u0631\u06cc\u0639\u200c\u062a\u0631\u06cc\u0646 \u0631\u0648\u06cc\u06a9\u0631\u062f<\/th><\/tr><\/thead><tbody><tr><td>\u062d\u0630\u0641 \u06cc\u06a9 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u062a\u06a9\u0631\u0627\u0631\u0634\u0648\u0646\u062f\u0647<\/td><td>replace()<\/td><\/tr><tr><td>\u062d\u0630\u0641 \u0686\u0646\u062f \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0645\u062e\u062a\u0644\u0641<\/td><td>translate() \u06cc\u0627 \u06cc\u06a9 <code>re.sub('[abc]', '')<\/code><\/td><\/tr><tr><td>\u067e\u0627\u06a9\u200c\u0633\u0627\u0632\u06cc \u0645\u0628\u062a\u0646\u06cc-\u0628\u0631-\u0627\u0644\u06af\u0648<\/td><td>re.sub()<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0632\u0646\u062c\u06cc\u0631 \u06a9\u0631\u062f\u0646 \u0686\u0646\u062f \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc <code>replace()<\/code> \u0631\u0648\u06cc \u0631\u0634\u062a\u0647\u0647\u0627\u06cc \u0639\u0638\u06cc\u0645\u060c \u0647\u0632\u06cc\u0646\u0647 \u0628\u06cc\u0634\u062a\u0631\u06cc \u0627\u0632 \u06cc\u06a9 <code>translate()<\/code> \u06cc\u0627 Regex \u0645\u0646\u0641\u0631\u062f \u062f\u0627\u0631\u062f. \u0628\u0631\u0627\u06cc \u0631\u0634\u062a\u0647\u0647\u0627\u06cc \u0645\u0639\u0645\u0648\u0644 \u0627\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646\u060c \u0647\u0631 \u06cc\u06a9 \u0627\u0632 \u0627\u06cc\u0646 \u0631\u0648\u0634\u0647\u0627 \u0628\u0647\u200c\u0642\u062f\u0631 \u06a9\u0627\u0641\u06cc \u0633\u0631\u06cc\u0639 \u0627\u0633\u062a\u2014\u0641\u0642\u0637 \u0648\u0642\u062a\u06cc Profile \u0628\u06af\u06cc\u0631\u06cc\u062f \u06a9\u0647 \u0645\u06af\u0627\u0628\u0627\u06cc\u062a\u0647\u0627 \u062f\u0627\u062f\u0647 \u0628\u0647\u200c\u0627\u0632\u0627\u06cc \u0647\u0631 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u067e\u0631\u062f\u0627\u0632\u0634 \u0645\u06cc\u200c\u06a9\u0646\u06cc\u062f.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u062d\u0630\u0641 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627\u06cc \u0646\u0627\u062e\u0648\u0627\u0633\u062a\u0647 \u062f\u0631 \u0633\u062a\u0648\u0646\u0647\u0627\u06cc Pandas<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u062f\u0631 \u0631\u0648\u062f\u0647\u0627\u06cc \u06a9\u0627\u0631\u06cc \u062f\u0627\u062f\u0647\u060c \u0645\u062a\u062f\u0647\u0627\u06cc \u0631\u0634\u062a\u0647 \u0631\u0627 \u0628\u0647\u200c\u0627\u0632\u0627\u06cc \u0647\u0631 \u0633\u062a\u0648\u0646 \u0627\u0639\u0645\u0627\u0644 \u06a9\u0646\u06cc\u062f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0646\u06af\u0647 \u062f\u0627\u0634\u062a\u0646 \u0641\u0642\u0637 \u0627\u0631\u0642\u0627\u0645 \u0628\u0627 <code>.str.extract()<\/code> \u0648 \u06af\u0631\u0648\u0647 Capture:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pandas as pd\n\ndf = pd.DataFrame({'strings': &#91;'123abc', '456def', '789ghi']})\ndf&#91;'strings'] = df&#91;'strings'].str.extract(r'(\\d+)')&#91;0]\nprint(df)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0641\u06cc\u0644\u062a\u0631 \u0633\u0641\u0627\u0631\u0634\u06cc \u0628\u0627 <code>.apply()<\/code>:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def remove_vowels(text):\n    vowels = 'aeiouAEIOU'\n    return ''.join(c for c in text if c not in vowels)\n\ndf = pd.DataFrame({'strings': &#91;'hello world', 'python is fun']})\ndf&#91;'strings'] = df&#91;'strings'].apply(remove_vowels)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0628\u0631\u0627\u06cc \u0639\u0645\u0644\u06cc\u0627\u062a\u0647\u0627\u06cc \u0631\u0634\u062a\u0647\u0627\u06cc DataFrame \u06af\u0633\u062a\u0631\u062f\u0647\u200c\u062a\u0631\u060c \u0631\u0627\u0647\u0646\u0645\u0627\u06cc \u0645\u0627\u0698\u0648\u0644 Pandas \u0631\u0627 \u062f\u0631 \u067e\u0627\u0631\u0645\u06cc\u0646 \u06a9\u0644\u0648\u062f \u0628\u0628\u06cc\u0646\u06cc\u062f.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0633\u0648\u0627\u0644\u0627\u062a \u0645\u062a\u062f\u0627\u0648\u0644<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u06f1. \u0686\u0637\u0648\u0631 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u06cc \u0631\u0627 \u0627\u0632 \u0631\u0634\u062a\u0647 \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062d\u0630\u0641 \u06a9\u0646\u06cc\u0645\u061f<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>replace()<\/code> \u0631\u0627 \u0628\u0627 \u0631\u0634\u062a\u0647 \u062c\u0627\u06cc\u06af\u0632\u06cc\u0646\u06cc \u062e\u0627\u0644\u06cc \u0635\u062f\u0627 \u0628\u0632\u0646\u06cc\u062f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>text = \"Hello, World!\"\nprint(text.replace(\",\", \"\"))\n# Hello World!<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0628\u0631\u0627\u06cc \u0686\u0646\u062f \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0645\u062e\u062a\u0644\u0641\u060c <code>translate()<\/code> \u06cc\u0627 <code>re.sub()<\/code> \u0631\u0627 \u062a\u0631\u062c\u06cc\u062d \u0628\u062f\u0647\u06cc\u062f \u062a\u0627 \u062f\u0647\u0647\u0627 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc <code>replace()<\/code> \u0631\u0627 \u0632\u0646\u062c\u06cc\u0631 \u0646\u06a9\u0646\u06cc\u062f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u06f2. \u0622\u06cc\u0627 \u0645\u062a\u062f remove() \u0628\u0631\u0627\u06cc \u0631\u0634\u062a\u0647\u0647\u0627 \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f\u061f<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0646\u0647. <code>list.remove()<\/code> \u0622\u06cc\u062a\u0645\u06cc \u0631\u0627 \u0627\u0632 \u0644\u06cc\u0633\u062a \u062d\u0630\u0641 \u0645\u06cc\u200c\u06a9\u0646\u062f\u061b \u0627\u0645\u0627 \u0631\u0634\u062a\u0647\u0647\u0627 \u0645\u062a\u062f <code>remove()<\/code> \u0646\u062f\u0627\u0631\u0646\u062f. \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 <code>\"abc\".remove(\"a\")<\/code> \u0628\u0627\u0639\u062b AttributeError \u0645\u06cc\u200c\u0634\u0648\u062f. \u0628\u0631\u0627\u06cc \u0631\u0634\u062a\u0647\u0647\u0627 \u0627\u0632 <code>replace()<\/code>\u060c <code>translate()<\/code>\u060c <code>re.sub()<\/code> \u06cc\u0627 Slicing \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u06f3. \u0686\u0637\u0648\u0631 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u06cc \u0631\u0627 \u0627\u0632 \u0631\u0634\u062a\u0647 \u0628\u0631 \u0627\u0633\u0627\u0633 Index \u062d\u0630\u0641 \u06a9\u0646\u0645\u061f<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0627\u0632 Slicing \u0628\u0631\u0627\u06cc \u0631\u062f \u06a9\u0631\u062f\u0646 Index \u0646\u0627\u062e\u0648\u0627\u0633\u062a\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>s = \"EXAMPLE\"\ni = 2  # \u062d\u0630\u0641 'A' \u062f\u0631 index \u06cc\u0639\u0646\u06cc 2\nprint(s&#91;:i] + s&#91;i+1:])\n# EXMPLE<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0628\u0631\u0627\u06cc \u062d\u0630\u0641 \u0647\u0631 \u0645\u0648\u0631\u062f \u0627\u0632 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u06cc\u2014\u0641\u0627\u0631\u063a \u0627\u0632 \u0645\u0648\u0642\u0639\u06cc\u062a\u2014from <code>replace()<\/code> \u06cc\u0627 <code>translate()<\/code> \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f\u061b \u0646\u0647 Slicing \u0645\u0628\u062a\u0646\u06cc \u0628\u0631 Index.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u06f4. strip() \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646 \u0686\u06cc\u0633\u062a \u0648 \u0686\u0647 \u0648\u0642\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647\u200c\u0627\u0634 \u06a9\u0646\u0645\u061f<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>strip()<\/code> \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627\u06cc \u0627\u0628\u062a\u062f\u0627\u06cc\u06cc \u0648 \u0627\u0646\u062a\u0647\u0627\u06cc\u06cc (\u067e\u06cc\u0634\u200c\u0641\u0631\u0636: Whitespace) \u0631\u0627 \u062d\u0630\u0641 \u0645\u06cc\u200c\u06a9\u0646\u062f. Variant\u0647\u0627\u06cc <code>lstrip()<\/code> \u0648 <code>rstrip()<\/code> \u0641\u0642\u0637 \u06cc\u06a9 \u0633\u0645\u062a \u0631\u0627 Trim \u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. \u0627\u06cc\u0646 \u0645\u062a\u062f\u0647\u0627 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627 \u0631\u0627 \u0627\u0632 \u0648\u0633\u0637 \u0631\u0634\u062a\u0647 \u062d\u0630\u0641 \u0646\u0645\u06cc\u200c\u06a9\u0646\u0646\u062f. \u0628\u0639\u062f \u0627\u0632 \u062e\u0648\u0627\u0646\u062f\u0646 \u062e\u0637\u0648\u0637 \u0627\u0632 \u0641\u0627\u06cc\u0644 \u0627\u0632 <code>strip()<\/code> \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u062f\u061b \u0648\u0642\u062a\u06cc \u062e\u0637\u0647\u0627\u06cc \u062c\u062f\u06cc\u062f \u062f\u0631 \u0647\u0631\u062c\u0627\u06cc \u0645\u062a\u0646 \u0638\u0627\u0647\u0631 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u0627\u0632 <code>replace('\\n', '')<\/code> \u06cc\u0627 <code>translate()<\/code> \u0628\u0647\u0631\u0647 \u0628\u0628\u0631\u06cc\u062f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u06f5. \u0686\u0637\u0648\u0631 \u0686\u0646\u062f \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u0631\u0627 \u0627\u0632 \u0631\u0634\u062a\u0647 \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646 \u062d\u0630\u0641 \u06a9\u0646\u0645\u061f<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u06af\u0632\u06cc\u0646\u0647 \u06f1 \u2014 translate() (\u06cc\u06a9 \u06af\u0630\u0631):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>s = \"a1b2c3\"\nprint(s.translate(str.maketrans(\"\", \"\", \"abc\")))\n# 123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u06af\u0632\u06cc\u0646\u0647 \u06f2 \u2014 re.sub() (\u0627\u0644\u06af\u0648):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import re\nprint(re.sub(r'&#91;abc]', '', s))\n# 123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u06af\u0632\u06cc\u0646\u0647 \u06f3 \u2014 \u062d\u0644\u0642\u0647 \u0628\u0627 replace() (\u062e\u0648\u0627\u0646\u0627 \u0628\u0631\u0627\u06cc \u0641\u0647\u0631\u0633\u062a \u06a9\u0648\u062a\u0627\u0647):<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for ch in \"abc\":\n    s = s.replace(ch, \"\")<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0628\u0631\u0627\u06cc \u062f\u0648 \u06cc\u0627 \u0633\u0647 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u060c \u062d\u0644\u0642\u0647 \u062e\u0648\u0628 \u0627\u0633\u062a. \u0628\u0631\u0627\u06cc \u0645\u062c\u0645\u0648\u0639\u0647\u0647\u0627\u06cc \u062d\u0630\u0641 \u0637\u0648\u0644\u0627\u0646\u06cc\u200c\u062a\u0631\u060c <code>translate()<\/code> \u06cc\u0627 Regex \u0645\u0639\u0645\u0648\u0644\u0627\u064b \u0634\u0641\u0627\u0641\u200c\u062a\u0631 \u0628\u0648\u062f\u0647 \u0648 \u0631\u0648\u06cc \u0648\u0631\u0648\u062f\u06cc\u0647\u0627\u06cc \u0628\u0632\u0631\u06af \u0633\u0631\u06cc\u0639\u200c\u062a\u0631 \u0627\u0633\u062a.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u0646\u062a\u06cc\u062c\u0647\u200c\u06af\u06cc\u0631\u06cc<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627 \u0631\u0627 \u0627\u0632 \u0631\u0634\u062a\u0647\u0647\u0627\u06cc \u067e\u0627\u06cc\u062a\u0648\u0646 \u0628\u0627 <code>replace()<\/code> \u0628\u0631\u0627\u06cc Literal\u0647\u0627\u060c <code>translate()<\/code> \u0628\u0631\u0627\u06cc \u062f\u0633\u062a\u0647\u200c\u0647\u0627\u06cc \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u060c <code>re.sub()<\/code> \u0628\u0631\u0627\u06cc \u0627\u0644\u06af\u0648\u0647\u0627 \u0648 Slicing \u0628\u0631\u0627\u06cc \u0648\u06cc\u0631\u0627\u06cc\u0634\u0647\u0627\u06cc \u0645\u0648\u0642\u0639\u06cc\u062a\u06cc \u062d\u0630\u0641 \u06a9\u0646\u06cc\u062f. \u0627\u0628\u0632\u0627\u0631\u06cc \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f \u06a9\u0647 \u0628\u0627 \u0645\u062c\u0645\u0648\u0639\u0647 \u0642\u0648\u0627\u0646\u06cc\u0646\u200c\u062a\u0627\u0646 \u0645\u0637\u0627\u0628\u0642\u062a \u062f\u0627\u0631\u062f\u061b \u06cc\u0627\u062f\u062a\u0627\u0646 \u0628\u0627\u0634\u062f \u0631\u0634\u062a\u0647\u0647\u0627 Immutable \u0647\u0633\u062a\u0646\u062f\u061b \u0648 \u0645\u0642\u062f\u0627\u0631 \u062c\u062f\u06cc\u062f \u0631\u0627 \u0628\u0647 Caller \u0628\u0631\u06af\u0631\u062f\u0627\u0646\u06cc\u062f.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0645\u0642\u062f\u0645\u0647 \u0628\u0631\u0627\u06cc \u062d\u0630\u0641 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627 \u0627\u0632 \u0631\u0634\u062a\u0647\u200c\u0627\u06cc \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646\u060c \u0628\u0627\u06cc\u062f \u0631\u0634\u062a\u0647 \u062c\u062f\u06cc\u062f\u06cc \u0628\u0633\u0627\u0632\u06cc\u062f\u061b \u0686\u0648\u0646 \u0627\u0634\u06cc\u0627\u06cc str Immutable \u0647\u0633\u062a\u0646\u062f. \u0627\u0632 str.replace() \u0628\u0631\u0627\u06cc \u06cc\u06a9 \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u06cc\u0627 \u0632\u06cc\u0631\u0631\u0634\u062a\u0647\u061b \u0627\u0632 str.translate() \u06cc\u0627 str.maketrans() \u0628\u0631\u0627\u06cc \u062d\u0630\u0641 \u0686\u0646\u062f \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631 \u062f\u0631 \u06cc\u06a9 \u06af\u0630\u0631\u061b \u0627\u0632 re.sub() \u0628\u0631\u0627\u06cc \u062d\u0630\u0641 \u0645\u0628\u062a\u0646\u06cc \u0628\u0631 \u0627\u0644\u06af\u0648\u061b \u0648 \u0627\u0632 Slicing \u0648\u0642\u062a\u06cc \u0644\u0627\u0632\u0645 \u0627\u0633\u062a \u06a9\u0627\u0631\u0627\u06a9\u062a\u0631\u0647\u0627 \u0631\u0627 \u062f\u0631 \u0627\u0628\u062a\u062f\u0627\u060c \u0627\u0646\u062a\u0647\u0627 \u06cc\u0627 Index &hellip;<\/p>\n","protected":false},"author":9,"featured_media":7082,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[190,8,343],"tags":[],"class_list":["post-7080","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming","category-8","category-python"],"_links":{"self":[{"href":"https:\/\/parmin.cloud\/blog\/wp-json\/wp\/v2\/posts\/7080","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/parmin.cloud\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/parmin.cloud\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/parmin.cloud\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/parmin.cloud\/blog\/wp-json\/wp\/v2\/comments?post=7080"}],"version-history":[{"count":1,"href":"https:\/\/parmin.cloud\/blog\/wp-json\/wp\/v2\/posts\/7080\/revisions"}],"predecessor-version":[{"id":7081,"href":"https:\/\/parmin.cloud\/blog\/wp-json\/wp\/v2\/posts\/7080\/revisions\/7081"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/parmin.cloud\/blog\/wp-json\/wp\/v2\/media\/7082"}],"wp:attachment":[{"href":"https:\/\/parmin.cloud\/blog\/wp-json\/wp\/v2\/media?parent=7080"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/parmin.cloud\/blog\/wp-json\/wp\/v2\/categories?post=7080"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/parmin.cloud\/blog\/wp-json\/wp\/v2\/tags?post=7080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}