{"id":7717,"date":"2021-02-07T08:07:57","date_gmt":"2021-02-07T08:07:57","guid":{"rendered":"https:\/\/mehdisalimi.ir\/?p=7717"},"modified":"2021-02-07T12:27:11","modified_gmt":"2021-02-07T12:27:11","slug":"40-%d9%82%d8%b7%d8%b9%d9%87-%da%a9%d8%af-%d9%85%d9%87%d9%85-%d9%be%d8%a7%db%8c%d8%aa%d9%88%d9%86","status":"publish","type":"post","link":"https:\/\/mehdisalimi.ir\/?p=7717","title":{"rendered":"\u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0647\u0645 \u067e\u0627\u06cc\u062a\u0648\u0646 \u06a9\u0647 \u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u062f"},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\">\u067e\u0627\u06cc\u062a\u0648\u0646 \u0628\u0647 \u06cc\u06a9\u06cc \u0627\u0632 \u0645\u062d\u0628\u0648\u0628\u200c\u062a\u0631\u06cc\u0646 \u0632\u0628\u0627\u0646\u200c\u0647\u0627\u06cc\u06cc \u062a\u0628\u062f\u06cc\u0644 \u0634\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u062d\u0648\u0632\u0647\u200c\u0647\u0627\u06cc \u0639\u0644\u0645 \u062f\u0627\u062f\u0647 \u0648 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646\u060c \u062a\u0648\u0633\u0639\u0647 \u0648\u0628\u060c \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a\u200c\u0646\u0648\u06cc\u0633\u06cc\u060c \u0627\u062a\u0648\u0645\u0627\u0633\u06cc\u0648\u0646 \u0648 \u062d\u0648\u0632\u0647\u200c\u0647\u0627\u06cc \u0628\u0633\u06cc\u0627\u0631 \u062f\u06cc\u06af\u0631 \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f. \u0628\u062e\u0634\u06cc \u0627\u0632 \u062f\u0644\u06cc\u0644 \u0627\u06cc\u0646 \u0645\u062d\u0628\u0648\u0628\u06cc\u062a \u06af\u0633\u062a\u0631\u062f\u0647\u060c \u0633\u0627\u062f\u06af\u06cc \u0648 \u0633\u0647\u0648\u0644\u062a \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0622\u0646 \u0627\u0633\u062a. \u062f\u0631 \u0627\u06cc\u0646 \u0648\u0628 \u0646\u0648\u0634\u062a \u0628\u0647 \u0637\u0648\u0631 \u0645\u062e\u062a\u0635\u0631 \u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0641\u06cc\u062f \u067e\u0627\u06cc\u062a\u0648\u0646 \u0631\u0627 \u0645\u0639\u0631\u0641\u06cc \u0645\u06cc\u200c\u06a9\u0646\u06cc\u0645.<\/span><\/p>\n<p><!--more--><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f1- \u0647\u0645\u0647 \u0639\u0646\u0627\u0635\u0631 \u06cc\u06a9\u062a\u0627<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0645\u062a\u062f \u0632\u06cc\u0631 \u0628\u0631\u0631\u0633\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f \u06a9\u0647 \u0622\u06cc\u0627 \u062f\u0631 \u0644\u06cc\u0633\u062a \u0645\u0641\u0631\u0648\u0636 \u0639\u0646\u0627\u0635\u0631 \u062a\u06a9\u0631\u0627\u0631\u06cc \u0648\u062c\u0648\u062f \u062f\u0627\u0631\u062f \u06cc\u0627 \u0646\u0647. \u0627\u06cc\u0646 \u0645\u062a\u062f \u0627\u0632 \u0645\u0634\u062e\u0635\u0647 ()set \u0628\u0631\u0627\u06cc \u062d\u0630\u0641 \u0639\u0646\u0627\u0635\u0631 \u062a\u06a9\u0631\u0627\u0631\u06cc \u0627\u0632 \u0644\u06cc\u0633\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true \">def all_unique(lst):\r\n    return len(lst) == len(set(lst))\r\nx = [\u06f1,\u06f1,\u06f2,\u06f2,\u06f3,\u06f2,\u06f3,\u06f4,\u06f5,\u06f6]\r\ny = [\u06f1,\u06f2,\u06f3,\u06f4,\u06f5]\r\nall_unique(x) # False\r\nall_unique(y) # True<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u00a0\u06f2- \u0622\u0646\u0627\u06af\u0631\u0627\u0645<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0627\u06cc\u0646 \u0645\u062a\u062f \u0628\u0631\u0631\u0633\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f \u06a9\u0647 \u0622\u06cc\u0627 \u062f\u0648 \u0631\u0634\u062a\u0647 \u0622\u0646\u0627\u06af\u0631\u0627\u0645 \u0647\u0645 \u0647\u0633\u062a\u0646\u062f \u06cc\u0627 \u0646\u0647. \u0645\u0646\u0638\u0648\u0631 \u0627\u0632 \u0622\u0646\u0627\u06af\u0631\u0627\u0645 \u06a9\u0644\u0645\u0647 \u06cc\u0627 \u0627\u0635\u0637\u0644\u0627\u062d\u06cc \u0627\u0633\u062a \u06a9\u0647 \u0627\u0632 \u0637\u0631\u06cc\u0642 \u0628\u0627\u0632\u0686\u06cc\u062f\u0645\u0627\u0646 \u062d\u0631\u0648\u0641 \u06a9\u0644\u0645\u0647 \u06cc\u0627 \u0627\u0635\u0637\u0644\u0627\u062d \u062f\u06cc\u06af\u0631\u06cc \u0628\u0647 \u062f\u0633\u062a \u0622\u0645\u062f\u0647 \u0628\u0627\u0634\u062f \u0648 \u0628\u0647 \u0637\u0648\u0631 \u0645\u0639\u0645\u0648\u0644 \u062d\u0631\u0648\u0641 \u06a9\u0644\u0645\u0647 \u0627\u0635\u0644\u06cc \u062f\u0642\u06cc\u0642\u0627\u064b \u06cc\u06a9 \u0628\u0627\u0631 \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u0646\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">from collections import Counter\r\ndef anagram(first, second):\r\n    return Counter(first) == Counter(second)\r\nanagram(\"abcd3\", \"\u06f3acdb\") # True<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f3- \u062d\u0627\u0641\u0638\u0647<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u0645\u06cc\u0632\u0627\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062d\u0627\u0641\u0638\u0647 \u06cc\u06a9 \u0634\u06cc\u0621 \u0631\u0627 \u0628\u0631\u0631\u0633\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">import sys \r\nvariable = \u06f3\u06f0 \r\nprint(sys.getsizeof(variable)) # \u06f2\u06f4<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f4- \u0627\u0646\u062f\u0627\u0632\u0647 \u0628\u0627\u06cc\u062a<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0627\u06cc\u0646 \u0645\u062a\u062f \u0637\u0648\u0644 \u06cc\u06a9 \u0631\u0634\u062a\u0647 \u0627\u0632 \u0628\u0627\u06cc\u062a\u200c\u0647\u0627 \u0631\u0627 \u0628\u0627\u0632\u06af\u0634\u062a \u0645\u06cc\u200c\u062f\u0647\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def byte_size(string):\r\n    return(len(string.encode('utf-8')))\r\nbyte_size('?') # \u06f4\r\nbyte_size('Hello World') # \u06f1\u06f1<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f5- \u067e\u0631\u06cc\u0646\u062a \u06cc\u06a9 \u0631\u0634\u062a\u0647 \u0628\u0647 \u0645\u06cc\u0632\u0627\u0646 N \u0628\u0627\u0631<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u06cc\u06a9 \u0631\u0634\u062a\u0647 \u0631\u0627 n \u0628\u0627\u0631 \u0628\u062f\u0648\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062d\u0644\u0642\u0647 \u067e\u0631\u06cc\u0646\u062a \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">n = \u06f2; \r\ns =\"Programming\"; \r\nprint(s * n); # ProgrammingProgramming<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f6- \u0628\u0632\u0631\u06af\u200c\u0646\u0648\u06cc\u0633\u06cc \u062d\u0631\u0648\u0641 \u0627\u0648\u0644<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u0627\u0632 \u0645\u062a\u062f ()title \u0628\u0631\u0627\u06cc \u0628\u0632\u0631\u06af\u200c\u0646\u0648\u06cc\u0633\u06cc \u062d\u0631\u0648\u0641 \u0627\u0648\u0644 \u0647\u0645\u0647 \u06a9\u0644\u0645\u0627\u062a \u06cc\u06a9 \u0631\u0634\u062a\u0647 \u0628\u0647\u0631\u0647 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">s = \"programming is awesome\"\r\nprint(s.title()) # Programming Is Awesome<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f7- Chunk<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0627\u06cc\u0646 \u0645\u062a\u062f \u06cc\u06a9 \u0644\u06cc\u0633\u062a \u0631\u0627 \u0628\u0631 \u0627\u0633\u0627\u0633 \u0627\u0646\u062f\u0627\u0632\u0647 \u062a\u0639\u06cc\u06cc\u0646 \u0634\u062f\u0647 \u0628\u0647 \u0644\u06cc\u0633\u062a\u200c\u0647\u0627\u06cc \u06a9\u0648\u0686\u06a9\u200c\u062a\u0631\u06cc \u062a\u0642\u0633\u06cc\u0645\u200c\u0628\u0646\u062f\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def chunk(list, size):\r\n    return [list[i:i+size] for i in range(\u06f0,len(list), size)]<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f8- Compact<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0627\u06cc\u0646 \u0645\u062a\u062f \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 ()filter \u0645\u0642\u0627\u062f\u06cc\u0631 \u0646\u0627\u062f\u0631\u0633\u062a (False \u060cNone \u060c\u06f0 \u0648 &#8220;&#8221;) \u0631\u0627 \u0627\u0632 \u06cc\u06a9 \u0644\u06cc\u0633\u062a \u062d\u0630\u0641 \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def compact(lst):\r\n    return list(filter(bool, lst))\r\ncompact([\u06f0, \u06f1, False, \u06f2, '', \u06f3, 'a', 's', \u06f3\u06f4]) # [ \u06f1, \u06f2, \u06f3, 'a', 's', 34 ]<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f9- Count by<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u0628\u0631\u0627\u06cc \u0645\u062d\u0627\u0633\u0628\u0647 <a href=\"https:\/\/fa.wikipedia.org\/wiki\/\u062a\u0631\u0627\u0646\u0647\u0627\u062f\u0647\">\u062a\u0631\u0627\u0646\u0647\u0627\u062f\u0647<\/a> \u06cc\u06a9 \u0622\u0631\u0627\u06cc\u0647 \u06f2 \u0628\u0639\u062f\u06cc \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f:<\/span><span style=\"font-size: 16px;\"><\/span><\/p>\n<pre class=\"lang:python decode:true \">array = [['a', 'b'], ['c', 'd'], ['e', 'f']]\r\ntransposed = zip(*array)\r\nprint(transposed) # [('a', 'c', 'e'), ('b', 'd', 'f')]<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f1\u06f0- \u0645\u0642\u0627\u06cc\u0633\u0647 \u0632\u0646\u062c\u06cc\u0631\u06cc<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062a\u062f \u0632\u06cc\u0631 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u0647\u0631 \u0646\u0648\u0639 \u0639\u0645\u0644\u06af\u0631\u06cc \u0631\u0627 \u062f\u0631 \u06cc\u06a9 \u062e\u0637 \u0645\u0646\u0641\u0631\u062f \u0628\u0647 \u0635\u0648\u0631\u062a \u0686\u0646\u062f\u0628\u0627\u0631\u0647 \u0645\u0642\u0627\u06cc\u0633\u0647 \u06a9\u0646\u06cc\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">a = \u06f3\r\nprint( \u06f2 &lt; a &lt; \u06f8) # True\r\nprint(\u06f1 == a &lt; \u06f2) # False<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f1\u06f1- \u062c\u062f\u0627 \u0634\u062f\u0647 \u0628\u0627 \u06a9\u0627\u0645\u0627<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u0628\u0631\u0627\u06cc \u062a\u0628\u062f\u06cc\u0644 \u06cc\u06a9 \u0644\u06cc\u0633\u062a \u0627\u0632 \u0631\u0634\u062a\u0647\u200c\u0647\u0627 \u0628\u0647 \u0631\u0634\u062a\u0647 \u0645\u0646\u0641\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f\u060c \u0628\u0647 \u0637\u0648\u0631\u06cc \u06a9\u0647 \u0647\u0631 \u0639\u0646\u0635\u0631 \u0627\u0632 \u0644\u06cc\u0633\u062a \u0628\u0627 \u06a9\u0627\u0645\u0627 \u062c\u062f\u0627 \u0634\u062f\u0647 \u0628\u0627\u0634\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">hobbies = [\"basketball\", \"football\", \"swimming\"]\r\nprint(\"My hobbies are:\") # My hobbies are:\r\nprint(\", \".join(hobbies)) # basketball, football, swimming<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f1\u06f2- \u0628\u0647 \u062f\u0633\u062a \u0622\u0648\u0631\u062f\u0646 \u062d\u0631\u0648\u0641 \u0635\u062f\u0627\u062f\u0627\u0631<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u062d\u0631\u0648\u0641 \u0635\u062f\u0627\u062f\u0627\u0631 \u0627\u0646\u06af\u0644\u06cc\u0633\u06cc (\u06cc\u0639\u0646\u06cc a\u060c e\u060c i\u060c o \u0648 u) \u0631\u0627 \u062f\u0631 \u06cc\u06a9 \u0631\u0634\u062a\u0647 \u067e\u06cc\u062f\u0627 \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def get_vowels(string):\r\n    return [each for each in string if each in 'aeiou'] \r\nget_vowels('foobar') # ['o', 'o', 'a']\r\nget_vowels('gym') # []<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f1\u06f3- \u062e\u0631\u0648\u062c \u0627\u0632 \u062d\u0627\u0644\u062a \u062d\u0631\u0648\u0641 \u0628\u0632\u0631\u06af<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0645\u062a\u062f \u0632\u06cc\u0631 \u0628\u0631\u0627\u06cc \u062a\u0628\u062f\u06cc\u0644 \u062d\u0631\u0648\u0641 \u0627\u0648\u0644 \u0631\u0634\u062a\u0647 \u0645\u0641\u0631\u0648\u0636 \u0628\u0647 \u062d\u0631\u0648\u0641 \u06a9\u0648\u0686\u06a9 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">&gt;def decapitalize(str):\r\n    return str[:\u06f1].lower() + str[\u06f1:] \r\ndecapitalize('FooBar') # 'fooBar'\r\ndecapitalize('FooBar') # 'fooBar'<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f1\u06f4- \u0645\u0633\u0637\u062d \u0633\u0627\u0632\u06cc<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062a\u062f\u0647\u0627\u06cc \u0628\u0627\u0632\u06af\u0634\u062a\u06cc \u0644\u06cc\u0633\u062a\u200c\u0647\u0627\u06cc \u062a\u0648 \u062f\u0631 \u062a\u0648 \u0631\u0627 \u0628\u0647 \u0644\u06cc\u0633\u062a\u200c\u0647\u0627\u06cc \u0645\u0633\u0637\u062d \u062a\u0628\u062f\u06cc\u0644 \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def spread(arg):\r\n    ret = []\r\n    for i in arg:\r\n        if isinstance(i, list):\r\n            ret.extend(i)\r\n        else:\r\n            ret.append(i)\r\n    return ret\r\ndef deep_flatten(xs):\r\n    flat_list = []\r\n    [flat_list.extend(deep_flatten(x)) for x in xs] if isinstance(xs, list) else flat_list.append(xs)\r\n    return flat_list\r\ndeep_flatten([\u06f1, [\u06f2], [[\u06f3], \u06f4], \u06f5]) # [\u06f1,\u06f2,\u06f3,\u06f4,\u06f5]<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f1\u06f5- \u062a\u0641\u0627\u0648\u062a<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0627\u06cc\u0646 \u0645\u062a\u062f \u062a\u0641\u0627\u0648\u062a \u0628\u06cc\u0646 \u062f\u0648 \u0639\u0646\u0635\u0631 \u062a\u06a9\u0631\u0627\u0631\u067e\u0630\u06cc\u0631 \u0631\u0627 \u0628\u0627 \u0646\u06af\u0647\u200c\u062f\u0627\u0634\u062a\u0646 \u0622\u06cc\u062a\u0645\u200c\u0647\u0627\u06cc \u0645\u0634\u062a\u0631\u06a9 \u0628\u0631 \u0645\u0628\u0646\u0627\u06cc \u0639\u0646\u0635\u0631 \u0627\u0648\u0644 \u067e\u06cc\u062f\u0627 \u0645\u06cc\u200c\u06a9\u0646\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def difference(a, b):\r\n    set_a = set(a)\r\n    set_b = set(b)\r\n    comparison = set_a.difference(set_b)\r\n    return list(comparison)\r\ndifference([\u06f1,\u06f2,\u06f3], [\u06f1,\u06f2,\u06f4]) # [\u06f3]<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f1\u06f6- \u062a\u0641\u0627\u0648\u062a \u0628\u0627\u2026<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0645\u062a\u062f \u0632\u06cc\u0631 \u062a\u0641\u0627\u0648\u062a \u0628\u06cc\u0646 \u062f\u0648 \u0644\u06cc\u0633\u062a \u0631\u0627 \u067e\u0633 \u0627\u0632 \u0627\u0639\u0645\u0627\u0644 \u062a\u0627\u0628\u0639 \u0631\u0648\u06cc \u062a\u06a9 \u062a\u06a9 \u0639\u0646\u0627\u0635\u0631 \u0647\u0631 \u062f\u0648 \u0644\u06cc\u0633\u062a \u0628\u0627\u0632\u06af\u0634\u062a \u0645\u06cc\u200c\u062f\u0647\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def difference_by(a, b, fn):\r\n    b = set(map(fn, b))\r\n    return [item for item in a if fn(item) not in b]\r\nfrom math import floor\r\ndifference_by([\u06f2.\u06f1, \u06f1.\u06f2], [\u06f2.\u06f3, \u06f3.\u06f4], floor) # [\u06f1.\u06f2]\r\ndifference_by([{ 'x': \u06f2 }, { 'x': \u06f1 }], [{ 'x': \u06f1 }], lambda v : v['x']) # [ { x: 2 } ]<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f1\u06f7- \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0632\u0646\u062c\u06cc\u0631\u06cc \u062a\u0648\u0627\u0628\u0639<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0686\u0646\u062f\u06cc\u0646 \u062a\u0627\u0628\u0639 \u0631\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u062f\u0631 \u06cc\u06a9 \u062e\u0637 \u0645\u0646\u0641\u0631\u062f \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u06a9\u0631\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def add(a, b):\r\n    return a + b\r\ndef subtract(a, b):\r\n    return a - b\r\na, b = \u06f4, \u06f5\r\nprint((subtract if a &gt; b else add)(a, b)) # \u06f9<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f1\u06f8- \u0628\u0631\u0631\u0633\u06cc \u0648\u062c\u0648\u062f \u0639\u0646\u0627\u0635\u0631 \u062a\u06a9\u0631\u0627\u0631\u06cc<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0645\u062a\u062f \u0632\u06cc\u0631 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0627\u06cc\u0646 \u0648\u0627\u0642\u0639\u06cc\u062a \u06a9\u0647 ()set \u062a\u0646\u0647\u0627 \u0634\u0627\u0645\u0644 \u0639\u0646\u0627\u0635\u0631 \u06cc\u06a9\u062a\u0627 \u0627\u0633\u062a\u060c \u0628\u0631\u0631\u0633\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f \u0622\u06cc\u0627 \u06cc\u06a9 \u0644\u06cc\u0633\u062a \u0645\u0642\u0627\u062f\u06cc\u0631 \u062a\u06a9\u0631\u0627\u0631\u06cc \u062f\u0627\u0631\u062f \u06cc\u0627 \u0646\u0647:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def has_duplicates(lst):\r\n    return len(lst) != len(set(lst))    \r\nx = [\u06f1,\u06f2,\u06f3,\u06f4,\u06f5,\u06f5]\r\ny = [\u06f1,\u06f2,\u06f3,\u06f4,\u06f5]\r\nhas_duplicates(x) # True\r\nhas_duplicates(y) # False<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f1\u06f9- \u0627\u062f\u063a\u0627\u0645 \u062f\u0648 \u062f\u06cc\u06a9\u0634\u0646\u0631\u06cc<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0645\u062a\u062f \u0632\u06cc\u0631 \u0628\u0631\u0627\u06cc \u0627\u062f\u063a\u0627\u0645 \u062f\u0648 \u062f\u06cc\u06a9\u0634\u0646\u0631\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def merge_two_dicts(a, b):\r\n    c = a.copy()   # make a copy of a \r\n    c.update(b)    # modify keys and values of a with the ones from b\r\n    return c\r\na = { 'x': \u06f1, 'y': \u06f2}\r\nb = { 'y': \u06f3, 'z': \u06f4}\r\nprint(merge_two_dicts(a, b)) # {'y': 3, 'x': 1, 'z': 4}<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\">\u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646 \u06f3\u066b\u06f5 \u0648 \u0628\u0627\u0644\u0627\u062a\u0631 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0627\u062f\u063a\u0627\u0645 \u062f\u0648 \u062f\u06cc\u06a9\u0634\u0646\u0631\u06cc \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0646\u06cc\u0632 \u0627\u0646\u062c\u0627\u0645 \u062f\u0627\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def merge_dictionaries(a, b)\r\n   return {**a, **b}\r\na = { 'x': \u06f1, 'y': \u06f2}\r\nb = { 'y': \u06f3, 'z': \u06f4}\r\nprint(merge_dictionaries(a, b)) # {'y': 3, 'x': 1, 'z': 4}<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f2\u06f0- \u062a\u0628\u062f\u06cc\u0644 \u062f\u0648 \u0644\u06cc\u0633\u062a \u0628\u0647 \u06cc\u06a9 \u062f\u06cc\u06a9\u0634\u0646\u0631\u06cc<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0645\u062a\u062f \u0632\u06cc\u0631 \u0628\u0631\u0627\u06cc \u062a\u0628\u062f\u06cc\u0644 \u062f\u0648 \u0644\u06cc\u0633\u062a \u0628\u0647 \u06cc\u06a9 \u062f\u06cc\u06a9\u0634\u0646\u0631\u06cc \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def to_dictionary(keys, values):\r\n    return dict(zip(keys, values))\r\nkeys = [\"a\", \"b\", \"c\"]    \r\nvalues = [\u06f2, \u06f3, \u06f4]\r\nprint(to_dictionary(keys, values)) # {'a': 2, 'c': 4, 'b': 3}<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f2\u06f1- \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 enumerate<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u0646\u0634\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u062f \u06a9\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0627\u0632 enumerate \u0628\u0631\u0627\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u0642\u0627\u062f\u06cc\u0631 \u0648 \u0647\u0645\u0686\u0646\u06cc\u0646 \u0627\u0646\u062f\u06cc\u0633\u200c\u0647\u0627\u06cc \u0644\u06cc\u0633\u062a\u200c\u0647\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">list = [\"a\", \"b\", \"c\", \"d\"]\r\nfor index, element in enumerate(list): \r\n    print(\"Value\", element, \"Index \", index, )\r\n# ('Value', 'a', 'Index ', 0)\r\n# ('Value', 'b', 'Index ', 1)\r\n#('Value', 'c', 'Index ', 2)\r\n# ('Value', 'd', 'Index ', 3)<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f2\u06f2- \u0632\u0645\u0627\u0646 \u0635\u0631\u0641 \u0634\u062f\u0647<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u0628\u0631\u0627\u06cc \u0645\u062d\u0627\u0633\u0628\u0647 \u0632\u0645\u0627\u0646 \u0635\u0631\u0641 \u0634\u062f\u0647 \u0628\u0631\u0627\u06cc \u0627\u062c\u0631\u0627\u06cc \u06cc\u06a9 \u06a9\u062f \u062e\u0627\u0635 \u06a9\u0627\u0631\u0628\u0631\u062f \u062f\u0627\u0631\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">import time\r\nstart_time = time.time()\r\na = \u06f1\r\nb = \u06f2\r\nc = a + b\r\nprint(c) #\u06f3\r\nend_time = time.time()\r\ntotal_time = end_time - start_time\r\nprint(\"Time: \", total_time)\r\n# ('Time: ', 1.1205673217773438e-05)<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f2\u06f3- Try else<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0634\u0645\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f else \u0631\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0628\u062e\u0634\u06cc \u0627\u0632 \u06cc\u06a9 \u0628\u0644\u0648\u06a9 try\/except \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u06cc\u062f \u06a9\u0647 \u062f\u0631 \u0635\u0648\u0631\u062a \u0639\u062f\u0645 \u0648\u062c\u0648\u062f \u0627\u0633\u062a\u062b\u0646\u0627 \u0627\u062c\u0631\u0627 \u0645\u06cc\u200c\u0634\u0648\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">try:\r\n    \u06f2*\u06f3\r\nexcept TypeError:\r\n    print(\"An exception was raised\")\r\nelse:\r\n    print(\"Thank God, no exceptions were raised.\")\r\n#Thank God, no exceptions were raised.<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f2\u06f4- \u0628\u06cc\u0634\u062a\u0631\u06cc\u0646 \u0641\u0631\u0627\u0648\u0627\u0646\u06cc<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0645\u062a\u062f \u0632\u06cc\u0631 \u0639\u0646\u0635\u0631 \u062f\u0627\u0631\u0627\u06cc \u0628\u06cc\u0634\u062a\u0631\u06cc\u0646 \u0641\u0631\u0627\u0648\u0627\u0646\u06cc \u0631\u0627 \u062f\u0631 \u06cc\u06a9 \u0644\u06cc\u0633\u062a \u0628\u0627\u0632\u06af\u0634\u062a \u0645\u06cc\u200c\u062f\u0647\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def most_frequent(list):\r\n    return max(set(list), key = list.count)\r\nnumbers = [\u06f1,\u06f2,\u06f1,\u06f2,\u06f3,\u06f2,\u06f1,\u06f4,\u06f2]\r\nmost_frequent(numbers)<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f2\u06f5- \u067e\u0627\u0644\u06cc\u0646\u062f\u0631\u0648\u0645<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0645\u062a\u062f \u0632\u06cc\u0631 \u0628\u0631\u0631\u0633\u06cc \u0645\u06cc\u200c\u06a9\u0646\u062f \u0622\u06cc\u0627 \u06cc\u06a9 \u0631\u0634\u062a\u0647 \u067e\u0627\u0644\u06cc\u0646\u062f\u0631\u0648\u0645 \u0627\u0633\u062a \u06cc\u0627 \u0646\u0647. \u067e\u0627\u0644\u06cc\u0646\u062f\u0631\u0648\u0645 \u0628\u0647 \u06a9\u0644\u0645\u0627\u062a\u06cc \u06af\u0641\u062a\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u06a9\u0647 \u0648\u0642\u062a\u06cc \u0627\u0632 \u0627\u0646\u062a\u0647\u0627 \u0628\u0647 \u0627\u0628\u062a\u062f\u0627 \u062e\u0648\u0627\u0646\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u0646\u062f \u0646\u06cc\u0632 \u0647\u0645\u0627\u0646\u0646\u062f \u062c\u0647\u062a \u0627\u0628\u062a\u062f\u0627 \u0628\u0647 \u0627\u0646\u062a\u0647\u0627 \u0647\u0633\u062a\u0646\u062f. \u0645\u0627\u0646\u0646\u062f \u062f\u0631\u062f\u060c \u0646\u0627\u062f\u0627\u0646 \u0648 \u063a\u06cc\u0631\u0647:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def palindrome(a):\r\n    return a == a[::-\u06f1]\r\npalindrome('mom') # True<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f2\u06f6- \u0645\u0627\u0634\u06cc\u0646 \u062d\u0633\u0627\u0628 \u0628\u062f\u0648\u0646 if-else<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u0646\u0634\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u062f \u06a9\u0647 \u0686\u0637\u0648\u0631 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u06cc\u06a9 \u0645\u0627\u0634\u06cc\u0646 \u062d\u0633\u0627\u0628 \u0631\u0627 \u0628\u062f\u0648\u0646 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06af\u0632\u0627\u0631\u0647\u200c\u0647\u0627\u06cc \u0634\u0631\u0637\u06cc if-else \u0646\u0648\u0634\u062a:<\/span><\/p>\n<pre class=\"lang:python decode:true\">import operator\r\naction = {\r\n    \"+\": operator.add,\r\n    \"-\": operator.sub,\r\n    \"\/\": operator.truediv,\r\n    \"*\": operator.mul,\r\n    \"**\": pow\r\n}\r\nprint(action['-'](\u06f5\u06f0, \u06f2\u06f5)) # \u06f2\u06f5<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f2\u06f7- Shuffle<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u0628\u0631\u0627\u06cc \u062a\u0635\u0627\u062f\u0641\u06cc \u0633\u0627\u0632\u06cc \u062a\u0631\u062a\u06cc\u0628 \u0639\u0646\u0627\u0635\u0631 \u062f\u0631 \u06cc\u06a9 \u0644\u06cc\u0633\u062a \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f. \u062a\u0648\u062c\u0647 \u06a9\u0646\u06cc\u062f \u06a9\u0647 shuffle \u062f\u0631\u062c\u0627 \u0639\u0645\u0644 \u0645\u06cc\u200c\u06a9\u0646\u062f \u0648 \u0645\u0642\u062f\u0627\u0631 none \u0628\u0627\u0632\u06af\u0634\u062a \u0645\u06cc\u200c\u062f\u0647\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">from random import shuffle\r\nfoo = [\u06f1, \u06f2, \u06f3, \u06f4]\r\nshuffle(foo) \r\nprint(foo) # [\u06f1, \u06f4, \u06f3, \u06f2] , foo = [1, 2, 3, 4]<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f2\u06f8- Spread<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0627\u06cc\u0646 \u0645\u062a\u062f \u06cc\u06a9 \u0644\u06cc\u0633\u062a \u0631\u0627 \u0645\u0627\u0646\u0646\u062f [].concat(\u2026arr) \u062f\u0631 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0645\u0633\u0637\u062d \u0645\u06cc\u200c\u0633\u0627\u0632\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">def spread(arg):\r\n    ret = []\r\n    for i in arg:\r\n        if isinstance(i, list):\r\n            ret.extend(i)\r\n        else:\r\n            ret.append(i)\r\n    return ret\r\nspread([\u06f1,\u06f2,\u06f3,[\u06f4,\u06f5,\u06f6],[\u06f7],\u06f8,\u06f9]) # [\u06f1,\u06f2,\u06f3,\u06f4,\u06f5,\u06f6,\u06f7,\u06f8,\u06f9]<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f2\u06f9- \u062a\u0639\u0648\u06cc\u0636 \u0645\u0642\u0627\u062f\u06cc\u0631<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u06cc\u06a9 \u0631\u0648\u0634 \u0633\u0631\u06cc\u0639 \u0628\u0631\u0627\u06cc \u062a\u0639\u0648\u06cc\u0636 \u062f\u0648 \u0645\u062a\u063a\u06cc\u0631 \u0628\u062f\u0648\u0646 \u0627\u0644\u0632\u0627\u0645 \u0628\u0647 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0645\u062a\u063a\u06cc\u0631 \u0633\u0648\u0645:<\/span><\/p>\n<pre class=\"lang:python decode:true\">a, b = -\u06f1, \u06f1\u06f4\r\na, b = b, a\r\nprint(a) # \u06f1\u06f4\r\nprint(b) # -\u06f1<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\"><strong>\u06f3\u06f0- \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u0642\u062f\u0627\u0631 \u067e\u06cc\u0634\u200c\u0641\u0631\u0636 \u0628\u0631\u0627\u06cc \u06a9\u0644\u06cc\u062f\u0647\u0627\u06cc \u0645\u0641\u0642\u0648\u062f<\/strong><\/span><br \/>\n<span style=\"font-size: 16px;\">\u0642\u0637\u0639\u0647 \u06a9\u062f \u0632\u06cc\u0631 \u0646\u0634\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u062f \u06a9\u0647 \u0686\u06af\u0648\u0646\u0647 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u06cc\u062f \u06cc\u06a9 \u0645\u0642\u062f\u0627\u0631 \u067e\u06cc\u0634\u200c\u0641\u0631\u0636 \u0631\u0627 \u062f\u0631 \u062d\u0627\u0644\u062a\u06cc \u06a9\u0647 \u06a9\u0644\u06cc\u062f \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062f\u0631 \u062f\u06cc\u06a9\u0634\u0646\u0631\u06cc \u0645\u0648\u062c\u0648\u062f \u0646\u0628\u0627\u0634\u062f \u0628\u0647 \u062f\u0633\u062a \u0622\u0648\u0631\u06cc\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">d = {'a': \u06f1, 'b': \u06f2}\r\nprint(d.get('c', \u06f3)) # \u06f3<\/pre>\n<p style=\"text-align: justify;\"><strong><span style=\"font-size: 16px;\">\u06f3\u06f1- \u062f\u0631\u06cc\u0627\u0641\u062a \u062a\u0627\u0631\u06cc\u062e \u0627\u0645\u0631\u0648\u0632<\/span><\/strong><br \/>\n<span style=\"font-size: 16px;\">\u062f\u0631 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0628\u0627\u0644\u0627\u060c \u06a9\u0644\u0627\u0633 date \u0627\u0632 \u0645\u0627\u0698\u0648\u0644 datetime \u00ab\u0648\u0627\u0631\u062f\u00bb (\u0627\u06cc\u0645\u067e\u0648\u0631\u062a | Import) \u0634\u062f\u0647 \u0627\u0633\u062a. \u0633\u067e\u0633\u060c \u0627\u0632 \u0645\u062a\u062f ()date.today \u0628\u0631\u0627\u06cc \u06af\u0631\u0641\u062a\u0646 \u062a\u0627\u0631\u06cc\u062e \u0645\u062d\u0644\u06cc \u06a9\u0646\u0648\u0646\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0628\u0627\u06cc\u062f \u062a\u0648\u062c\u0647 \u062f\u0627\u0634\u062a \u06a9\u0647 \u0645\u062a\u063a\u06cc\u0631 today \u06cc\u06a9 \u0634\u06cc date \u0627\u0633\u062a. \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0627\u0632 \u0645\u062a\u062f ()strftime \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0631\u0634\u062a\u0647\u200c\u0627\u06cc \u06a9\u0647 \u062a\u0627\u0631\u06cc\u062e \u0631\u0627 \u062f\u0631 \u0641\u0631\u0645\u062a\u200c\u0647\u0627\u06cc \u06af\u0648\u0646\u0627\u06af\u0648\u0646 \u0627\u0632 \u0627\u06cc\u0646 \u0634\u06cc \u0646\u0634\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u062f\u060c \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0631\u062f:<\/span><\/p>\n<pre class=\"lang:python decode:true\">from datetime import date\r\ntoday = date.today()\r\nprint(\"Today's date:\", today)<\/pre>\n<p style=\"text-align: justify;\"><strong><span style=\"font-size: 16px;\">\u06f3\u06f2- \u062a\u0627\u0631\u06cc\u062e \u06a9\u0646\u0648\u0646\u06cc \u062f\u0631 \u0641\u0631\u0645\u062a\u200c\u0647\u0627\u06cc \u06af\u0648\u0646\u0627\u06af\u0648\u0646<\/span><\/strong><\/p>\n<pre class=\"lang:python decode:true\">from datetime import date\r\ntoday = date.today()\r\n# dd\/mm\/YY\r\nd1 = today.strftime(\"%d\/%m\/%Y\")\r\nprint(\"d1 =\", d1)\r\n# Textual month, day and year\t\r\nd2 = today.strftime(\"%B %d, %Y\")\r\nprint(\"d2 =\", d2)\r\n# mm\/dd\/y\r\nd3 = today.strftime(\"%m\/%d\/%y\")\r\nprint(\"d3 =\", d3)\r\n# Month abbreviation, day and year\t\r\nd4 = today.strftime(\"%b-%d-%Y\")\r\nprint(\"d4 =\", d3)<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\">\u062e\u0631\u0648\u062c\u06cc \u062d\u0627\u0635\u0644 \u0627\u0632 \u0627\u062c\u0631\u0627\u06cc \u06a9\u062f\u0647\u0627\u06cc \u0628\u0627\u0644\u0627\u060c \u0686\u06cc\u0632\u06cc \u0634\u0628\u06cc\u0647 \u0628\u0647 \u0622\u0646\u0686\u0647 \u062e\u0648\u0627\u0647\u062f \u0628\u0648\u062f \u06a9\u0647 \u062f\u0631 \u0632\u06cc\u0631 \u0622\u0645\u062f\u0647 \u0627\u0633\u062a:<\/span><\/p>\n<pre class=\"lang:default decode:true\">d1 = \u06f2\u06f5\/\u06f1\u06f2\/\u06f2\u06f0\u06f1\u06f8\r\nd2 = December \u06f2\u06f5, \u06f2\u06f0\u06f1\u06f8\r\nd3 = \u06f1\u06f2\/\u06f2\u06f5\/\u06f1\u06f8\r\nd4 = \u06f1\u06f2\/\u06f2\u06f5\/\u06f1\u06f8<\/pre>\n<p style=\"text-align: justify;\"><strong><span style=\"font-size: 16px;\">\u06f3\u06f3- \u062f\u0631\u06cc\u0627\u0641\u062a \u062a\u0627\u0631\u06cc\u062e \u0648 \u0633\u0627\u0639\u062a \u06a9\u0646\u0648\u0646\u06cc<\/span><\/strong><br \/>\n<span style=\"font-size: 16px;\">\u062f\u0631 \u0627\u06cc\u0646\u062c\u0627\u060c \u0627\u0632 ()datetime.now \u0628\u0631\u0627\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u062a\u0627\u0631\u06cc\u062e \u0648 \u0633\u0627\u0639\u062a \u06a9\u0646\u0648\u0646\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a. \u0633\u067e\u0633\u060c \u0627\u0632 \u0645\u062a\u062f ()strftime \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u0631\u0634\u062a\u0647\u200c\u0627\u06cc \u06a9\u0647 \u062a\u0627\u0631\u06cc\u062e \u0648 \u0633\u0627\u0639\u062a \u0631\u0627 \u062f\u0631 \u0642\u0627\u0644\u0628 \u062f\u06cc\u06af\u0631\u06cc \u0646\u0645\u0627\u06cc\u0634 \u0645\u06cc\u200c\u062f\u0647\u062f\u060c \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a:<\/span><\/p>\n<pre class=\"lang:python decode:true\">from datetime import datetime\r\n# datetime object containing current date and time\r\nnow = datetime.now() \r\nprint(\"now =\", now)\r\n# dd\/mm\/YY H:M:S\r\ndt_string = now.strftime(\"%d\/%m\/%Y %H:%M:%S\")\r\nprint(\"date and time =\", dt_string)<\/pre>\n<p style=\"text-align: justify;\"><strong><span style=\"font-size: 16px;\">\u06f3\u06f4- \u0631\u0633\u0645 \u06af\u0631\u0627\u0641\u06cc\u06a9\u06cc \u062a\u0648\u0627\u0628\u0639\u060c \u0628\u0627 \u0631\u0648\u0634 matplotlib.pyplot.plot<\/span><\/strong><br \/>\n<span style=\"font-size: 16px;\">\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0631\u0648\u0634 matplotlib.pyplot.plot \u062f\u0631 \u067e\u0627\u06cc\u062a\u0648\u0646 (Python)\u060c \u0645\u06cc \u062a\u0648\u0627\u0646\u06cc\u0645 \u0645\u0642\u0627\u062f\u06cc\u0631 \u06cc\u06a9 \u062a\u0627\u0628\u0639 \u0631\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u06af\u0631\u0627\u0641\u06cc\u06a9\u06cc \u0631\u0633\u0645 \u06a9\u0646\u06cc\u0645. \u06cc\u0639\u0646\u06cc \u0645\u0642\u0627\u062f\u06cc\u0631 \u0648\u0631\u0648\u062f\u06cc \u062a\u0627\u0628\u0639 \u062f\u0631 \u0645\u062d\u0648\u0631 \u0627\u0641\u0642\u06cc \u0648 \u0645\u0642\u0627\u062f\u06cc\u0631 \u062e\u0631\u0648\u062c\u06cc \u062a\u0627\u0628\u0639 \u062f\u0631 \u0645\u062d\u0648\u0631 \u0639\u0645\u0648\u062f\u06cc \u0646\u0645\u0627\u06cc\u0634 \u062f\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u0646\u062f (\u062a\u0627\u0628\u0639 y \u0628\u0631 \u0627\u0633\u0627\u0633 x \u06a9\u0647 \u0645\u0642\u0627\u062f\u06cc\u0631 x \u062f\u0631 \u0645\u062d\u0648\u0631 \u0627\u0641\u0642\u06cc \u0648 \u0645\u0642\u0627\u062f\u06cc\u0631 y \u062f\u0631 \u0645\u062d\u0648\u0631 \u0639\u0645\u0648\u062f\u06cc \u0646\u0645\u0627\u06cc\u0634 \u062f\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u0646\u062f):<\/span><\/p>\n<pre class=\"lang:python decode:true\">import matplotlib.pyplot as plt\r\nx = [\u06f1, \u06f2, \u06f3, \u06f4, \u06f5, \u06f6]\r\ny = [\u06f4, \u06f1, \u06f2, \u06f6, \u06f3, \u06f8]\r\nplt.plot(x, y)\r\nplt.show()<\/pre>\n<p style=\"text-align: justify;\"><strong><span style=\"font-size: 16px;\">\u06f3\u06f5- \u062c\u062f\u0648\u0644 \u0636\u0631\u0628 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062d\u0644\u0642\u0647 \u06cc While<\/span><\/strong><\/p>\n<pre class=\"lang:python decode:true\">i = \u06f1\r\nj = \u06f1\r\nwhile i&lt;=\u06f1\u06f0:\r\n    while j&lt;=\u06f1\u06f0:\r\n        print(i * j , end=\" \")\r\n        j+=\u06f1\r\n    j = \u06f1\r\n    i+=\u06f1\r\n    print()<\/pre>\n<p style=\"text-align: justify;\"><strong><span style=\"font-size: 16px;\">\u06f3\u06f6- \u062c\u062f\u0648\u0644 \u0636\u0631\u0628 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062d\u0644\u0642\u0647 \u06cc For\u00a0<\/span><\/strong><\/p>\n<pre class=\"lang:python decode:true\">for i in range(\u06f1,\u06f1\u06f1):\r\n    for j in range(\u06f1,\u06f1\u06f1):\r\n        print(i * j,end=\" \")\r\n    print()<\/pre>\n<p style=\"text-align: justify;\"><strong><span style=\"font-size: 16px;\">\u06f3\u06f7- \u062a\u0634\u062e\u06cc\u0635 \u0633\u0627\u0644 \u06a9\u0628\u06cc\u0633\u0647 \u0645\u06cc\u0644\u0627\u062f\u06cc<\/span><\/strong><br \/>\n<span style=\"font-size: 16px;\">\u062f\u0631 \u0627\u06cc\u0646 \u0642\u0637\u0639\u0647 \u06a9\u062f \u06a9\u0627\u0631\u0628\u0631 \u0633\u0627\u0644 \u0645\u06cc\u0644\u0627\u062f\u06cc \u0631\u0627 \u0648\u0627\u0631\u062f \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0628\u0631\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631 \u067e\u06cc\u063a\u0627\u0645 \u0686\u0627\u067e \u0645\u06cc \u0634\u0648\u062f \u06a9\u0647 \u0633\u0627\u0644 \u06a9\u0628\u06cc\u0633\u0647 \u0647\u0633\u062a \u06cc\u0627 \u062e\u06cc\u0631.<\/span><br \/>\n<span style=\"font-size: 16px;\">\u062a\u0648\u0636\u06cc\u062d \u062f\u0631 \u0645\u0648\u0631\u062f \u0646\u062d\u0648\u0647 \u062a\u0634\u062e\u06cc\u0635 \u06a9\u0628\u06cc\u0633\u0647 \u0628\u0648\u062f\u0646 \u0633\u0627\u0644 \u0645\u06cc\u0644\u0627\u062f\u06cc:<\/span><br \/>\n<span style=\"font-size: 16px;\">\u0633\u0627\u0644 \u0627\u06af\u0631 \u0628\u0631 \u06f4\u06f0\u06f0 \u0628\u062e\u0634 \u067e\u0630\u06cc\u0631 \u0628\u0627\u0634\u062f(\u0628\u0627\u0642\u06cc\u0645\u0627\u0646\u062f\u0647 \u06cc \u062a\u0642\u0633\u06cc\u0645 \u0635\u0641\u0631 \u0628\u0627\u0634\u062f) \u06a9\u0628\u06cc\u0633\u0647 \u0647\u0633\u062a.<\/span><br \/>\n<span style=\"font-size: 16px;\">\u0633\u0627\u0644 \u0627\u06af\u0631 \u0628\u0631 \u06f1\u06f0\u06f0 \u0628\u062e\u0634 \u067e\u0630\u06cc\u0631 \u0628\u0627\u0634\u062f(\u0628\u0627\u0642\u06cc\u0645\u0627\u0646\u062f\u0647 \u06cc \u062a\u0642\u0633\u06cc\u0645 \u0635\u0641\u0631 \u0628\u0627\u0634\u062f) \u06a9\u0628\u06cc\u0633\u0647 \u0646\u06cc\u0633\u062a.<\/span><br \/>\n<span style=\"font-size: 16px;\">\u0633\u0627\u0644 \u0627\u06af\u0631 \u0628\u0631 \u06f4 \u0628\u062e\u0634 \u067e\u0630\u06cc\u0631 \u0628\u0627\u0634\u062f(\u0628\u0627\u0642\u06cc\u0645\u0627\u0646\u062f\u0647 \u06cc \u062a\u0642\u0633\u06cc\u0645 \u0635\u0641\u0631 \u0628\u0627\u0634\u062f) \u06a9\u0628\u06cc\u0633\u0647 \u0647\u0633\u062a.<\/span><br \/>\n<span style=\"font-size: 16px;\">\u0628\u0647 \u0639\u0628\u0627\u0631\u062a\u06cc \u062f\u06cc\u06af\u0631 \u0633\u0627\u0644\u06cc \u06a9\u0647 \u0628\u0631 \u06f4\u06f0\u06f0 \u0648 \u06f4 \u0628\u062e\u0634 \u067e\u0630\u06cc\u0631 \u0628\u0627\u0634\u0647 \u0648 \u0628\u0631 \u06f1\u06f0\u06f0 \u0628\u062e\u0634 \u067e\u0630\u06cc\u0631 \u0646\u0628\u0627\u0634\u062f\u060c \u0633\u0627\u0644 \u06a9\u0628\u06cc\u0633\u0647 \u0647\u0633\u062a.<\/span><\/p>\n<pre class=\"lang:python decode:true\">def is_leap_year(year):\r\n\tif(year%\u06f4\u06f0\u06f0 == \u06f0):\r\n\t\tresult = True\r\n\telif(year%\u06f1\u06f0\u06f0 == \u06f0):\r\n\t\tresult = False\r\n\telif(year%\u06f4 == \u06f0):\r\n\t\tresult = True\r\n\telse:\r\n\t\tresult = False\r\n\treturn result\t\r\nwhile True:\r\n\tyear = int(input(\"Please enter year: \"))\r\n\tif(is_leap_year(year)):\r\n\t\tprint(year, ' is a leap year.')\r\n\telse:\r\n\t\tprint(year, ' is not a leap year.')\r\n\tchoice = str(input('continue(y\/n)?')).lower()\r\n\tif(choice != 'y'):\r\n\t\tbreak<\/pre>\n<p style=\"text-align: justify;\"><strong><span style=\"font-size: 16px;\">\u06f3\u06f8- \u062a\u0648\u0644\u06cc\u062f \u0627\u0639\u062f\u0627\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u0628\u0627 \u067e\u0627\u06cc\u062a\u0648\u0646<\/span><\/strong><br \/>\n<span style=\"font-size: 16px;\">\u06a9\u062a\u0627\u0628\u062e\u0627\u0646\u0647 \u0627\u0633\u062a\u0627\u0646\u062f\u0627\u0631\u062f \u067e\u0627\u06cc\u062a\u0648\u0646\u060c \u0645\u0627\u0698\u0648\u0644\u06cc \u0628\u0627 \u0639\u0646\u0648\u0627\u0646 random \u0641\u0631\u0627\u0647\u0645 \u0645\u06cc\u200c\u06a9\u0646\u062f \u06a9\u0647 \u062f\u0627\u0631\u0627\u06cc \u062f\u0633\u062a\u0647\u200c\u0627\u06cc \u0627\u0632 \u062a\u0648\u0627\u0628\u0639 \u0628\u0631\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u0627\u0639\u062f\u0627\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u0627\u0633\u062a. \u067e\u0627\u06cc\u062a\u0648\u0646 \u0627\u0632 \u06cc\u06a9 \u0645\u0648\u0644\u062f \u0627\u0639\u062f\u0627\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u0645\u0633\u062a\u062d\u06a9\u0645 \u0648 \u0645\u062d\u0628\u0648\u0628 \u0628\u0647 \u0646\u0627\u0645 Mersenne Twister \u0628\u0647\u0631\u0647 \u0645\u06cc\u200c\u0628\u0631\u062f \u06a9\u0647 \u06cc\u06a9 \u062a\u0648\u0627\u0644\u06cc \u0627\u0632 \u0627\u0639\u062f\u0627\u062f \u062a\u0642\u0631\u06cc\u0628\u0627 \u062a\u0635\u0627\u062f\u0641\u06cc \u0631\u0627 \u062a\u0648\u0644\u06cc\u062f \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0627\u06cc\u0646 \u0645\u0648\u0644\u062f\u060c \u067e\u0627\u0631\u0627\u0645\u062a\u0631\u06cc \u0631\u0627 \u0628\u0631\u0627\u06cc \u0622\u063a\u0627\u0632 \u062a\u0648\u0627\u0644\u06cc \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u06cc\u200c\u06a9\u0646\u062f \u06a9\u0647 \u00ab\u062f\u0627\u0646\u0647\u00bb (seed) \u0646\u0627\u0645\u06cc\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f. \u062a\u0627\u0628\u0639 \u0642\u0637\u0639\u06cc \u0627\u0633\u062a\u060c \u0628\u062f\u06cc\u0646 \u0645\u0639\u0646\u0627 \u06a9\u0647 \u062f\u0627\u062f\u0646 \u06cc\u06a9 \u062f\u0627\u0646\u0647 \u0645\u0634\u0627\u0628\u0647\u060c \u0647\u0631 \u0628\u0627\u0631 \u0645\u0646\u062c\u0631 \u0628\u0647 \u062a\u0648\u0644\u06cc\u062f \u062a\u0648\u0627\u0644\u06cc \u0645\u0634\u0627\u0628\u0647\u06cc \u0627\u0632 \u0627\u0639\u062f\u0627\u062f \u0645\u06cc\u200c\u0634\u0648\u062f. \u0627\u0646\u062a\u062e\u0627\u0628 \u062f\u0627\u0646\u0647 \u0627\u0647\u0645\u06cc\u062a\u06cc \u0646\u062f\u0627\u0631\u062f.<\/span><br \/>\n<span style=\"font-size: 16px;\">\u062a\u0627\u0628\u0639 ()seed \u0628\u0647 \u0645\u0648\u0644\u062f \u0627\u0639\u062f\u0627\u062f \u062a\u0635\u0627\u062f\u0641\u06cc\u060c \u062f\u0627\u0646\u0647 \u0645\u06cc\u200c\u062f\u0647\u062f \u0648 \u06cc\u06a9 \u0639\u062f\u062f \u0635\u062d\u06cc\u062d \u0645\u0627\u0646\u0646\u062f \u06f1 \u06cc\u0627 \u06f7 \u0631\u0627 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0622\u0631\u06af\u0648\u0645\u0627\u0646 \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u06cc\u200c\u06a9\u0646\u062f. \u0627\u06af\u0631 \u062a\u0627\u0628\u0639 ()seed \u067e\u06cc\u0634 \u0627\u0632 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u062a\u0627\u0628\u0639 \u062a\u0635\u0627\u062f\u0641\u06cc \u0628\u0648\u062f\u0646 \u0641\u0631\u0627\u062e\u0648\u0627\u0646\u06cc \u0646\u0634\u0648\u062f\u060c \u0628\u0647 \u0637\u0648\u0631 \u067e\u06cc\u0634\u200c\u0641\u0631\u0636\u060c \u0627\u0632 \u0632\u0645\u0627\u0646 \u0633\u06cc\u0633\u062a\u0645 \u0628\u0647 \u0645\u06cc\u0644\u06cc\u200c\u062b\u0627\u0646\u06cc\u0647 \u0627\u0632 \u0645\u0628\u062f\u0627 \u062a\u0627\u0631\u06cc\u062e \u0645\u0648\u062c\u0648\u062f \u062f\u0631 \u0628\u0627\u06cc\u0648\u0633 (\u06f1\u06f9\u06f7\u06f0) \u0628\u0631\u0627\u06cc \u062a\u0648\u0644\u06cc\u062f \u0627\u0639\u062f\u0627\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f. \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631\u060c \u0686\u06af\u0648\u0646\u06af\u06cc \u062f\u0627\u0646\u0647 \u062f\u0627\u062f\u0646 \u0628\u0647 \u0645\u0648\u0644\u062f \u0639\u062f\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u0631\u0627 \u0646\u0634\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u062f \u06a9\u0647 \u0628\u0631 \u0627\u062b\u0631 \u0622\u0646\u060c \u0627\u0639\u062f\u0627\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u062a\u0648\u0644\u06cc\u062f \u0645\u06cc\u200c\u0634\u0648\u0646\u062f. \u0647\u0645\u0686\u0646\u06cc\u0646\u060c \u0646\u0634\u0627\u0646 \u0645\u06cc\u200c\u062f\u0647\u062f \u06a9\u0647 \u062f\u0627\u0646\u0647 \u062f\u0627\u062f\u0646 \u0645\u062c\u062f\u062f \u0628\u0647 \u0645\u0648\u0644\u062f\u0647\u0627 \u0645\u0646\u062c\u0631 \u0628\u0647 \u062a\u0648\u0644\u06cc\u062f \u062a\u0648\u0627\u0644\u06cc \u0645\u0634\u0627\u0628\u0647\u06cc \u0627\u0632 \u0627\u0639\u062f\u0627\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u0645\u06cc\u200c\u0634\u0648\u062f.<\/span><\/p>\n<pre class=\"lang:python decode:true\"># seed the pseudorandom number generator\r\nfrom random import seed\r\nfrom random import random\r\n# seed random number generator\r\nseed(\u06f1)\r\n# generate some random numbers\r\nprint(random(), random(), random())\r\n# reset the seed\r\nseed(\u06f1)\r\n# generate some random numbers\r\nprint(random(), random(), random())<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\">\u0628\u0627 \u0627\u062c\u0631\u0627\u06cc \u0645\u062b\u0627\u0644 \u0628\u0627\u0644\u0627\u060c \u0628\u0647 \u0645\u0648\u0644\u062f \u0627\u0639\u062f\u0627\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u062f\u0627\u0646\u0647 \u0628\u0627 \u0645\u0642\u062f\u0627\u0631 \u06f1 \u062f\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f\u061b \u0645\u0648\u0644\u062f\u060c \u06f3 \u0639\u062f\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u062a\u0648\u0644\u06cc\u062f \u0645\u06cc\u200c\u06a9\u0646\u062f\u060c \u0645\u062c\u062f\u062f\u0627 \u0628\u0647 \u0645\u0648\u0644\u062f \u062f\u0627\u0646\u0647 \u062f\u0627\u062f\u0647 \u0645\u06cc\u200c\u0634\u0648\u062f \u0648 \u0647\u0645\u0627\u0646\u0637\u0648\u0631 \u06a9\u0647 \u0645\u0634\u0647\u0648\u062f \u0627\u0633\u062a\u060c \u0633\u0647 \u0639\u062f\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u0645\u0634\u0627\u0628\u0647 \u062a\u0648\u0644\u06cc\u062f \u0645\u06cc\u200c\u0634\u0648\u0646\u062f.<\/span><\/p>\n<pre class=\"lang:default decode:true\">\u06f0\u066b\u06f1\u06f3\u06f4\u06f3\u06f6\u06f4\u06f2\u06f4\u06f4\u06f1\u06f1\u06f2\u06f4\u06f0\u06f1\u06f2\u06f2 \u06f0\u066b\u06f8\u06f4\u06f7\u06f4\u06f3\u06f3\u06f7\u06f3\u06f6\u06f9\u06f3\u06f7\u06f2\u06f3\u06f2\u06f7 \u06f0\u066b\u06f7\u06f6\u06f3\u06f7\u06f7\u06f4\u06f6\u06f1\u06f8\u06f9\u06f7\u06f6\u06f6\u06f1\u06f4\r\n\u06f0\u066b\u06f1\u06f3\u06f4\u06f3\u06f6\u06f4\u06f2\u06f4\u06f4\u06f1\u06f1\u06f2\u06f4\u06f0\u06f1\u06f2\u06f2 \u06f0\u066b\u06f8\u06f4\u06f7\u06f4\u06f3\u06f3\u06f7\u06f3\u06f6\u06f9\u06f3\u06f7\u06f2\u06f3\u06f2\u06f7 \u06f0\u066b\u06f7\u06f6\u06f3\u06f7\u06f7\u06f4\u06f6\u06f1\u06f8\u06f9\u06f7\u06f6\u06f6\u06f1\u06f4<\/pre>\n<p style=\"text-align: justify;\"><strong><span style=\"font-size: 16px;\">\u06f3\u06f9- \u062a\u0648\u0644\u06cc\u062f \u0627\u0639\u062f\u0627\u062f \u0635\u062d\u06cc\u062d \u062a\u0635\u0627\u062f\u0641\u06cc<\/span><\/strong><br \/>\n<span style=\"font-size: 16px;\">\u0645\u0642\u0627\u062f\u06cc\u0631 \u0635\u062d\u06cc\u062d \u062a\u0635\u0627\u062f\u0641\u06cc \u0631\u0627 \u0645\u06cc\u200c\u062a\u0648\u0627\u0646 \u0628\u0627 \u062a\u0627\u0628\u0639 ()randint \u062a\u0648\u0644\u06cc\u062f \u06a9\u0631\u062f. \u0627\u06cc\u0646 \u062a\u0627\u0628\u0639\u060c \u062f\u0648 \u0622\u0631\u06af\u0648\u0645\u0627\u0646 \u062f\u0631\u06cc\u0627\u0641\u062a \u0645\u06cc\u200c\u06a9\u0646\u062f\u061b \u0634\u0631\u0648\u0639 \u0648 \u067e\u0627\u06cc\u0627\u0646 \u0637\u06cc\u0641 \u0628\u0631\u0627\u06cc \u0645\u0642\u0627\u062f\u06cc\u0631 \u0635\u062d\u06cc\u062d \u062a\u0648\u0644\u06cc\u062f \u0634\u062f\u0647\u060c \u062f\u0648 \u0622\u0631\u06af\u0648\u0645\u0627\u0646 \u062f\u0631\u06cc\u0627\u0641\u062a\u06cc \u0647\u0633\u062a\u0646\u062f. \u0627\u0639\u062f\u0627\u062f \u0635\u062d\u06cc\u062d \u062a\u0635\u0627\u062f\u0641\u06cc \u062f\u0631 \u0637\u06cc\u0641 \u0645\u0642\u0627\u062f\u06cc\u0631 \u0634\u0631\u0648\u0639 \u0648 \u067e\u0627\u06cc\u0627\u0646 \u0648 \u0628\u0627 \u0627\u062d\u062a\u0633\u0627\u0628 \u062e\u0648\u062f \u0627\u06cc\u0646 \u0645\u0642\u0627\u062f\u06cc\u0631 (\u0628\u0627\u0632\u0647 \u0628\u0633\u062a\u0647 [start, end]) \u062a\u0648\u0644\u06cc\u062f \u0645\u06cc\u200c\u0634\u0648\u0646\u062f. \u0645\u062b\u0627\u0644 \u0632\u06cc\u0631\u060c \u06f1\u06f0 \u0639\u062f\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u0631\u0627 \u0628\u06cc\u0646 \u06f0 \u0648 \u06f1\u06f0 \u062a\u0648\u0644\u06cc\u062f \u0645\u06cc\u200c\u06a9\u0646\u062f.<\/span><\/p>\n<pre class=\"lang:python decode:true\"># generate random integer values\r\nfrom random import seed\r\nfrom random import randint\r\n# seed random number generator\r\nseed(\u06f1)\r\n# generate some integers\r\nfor _ in range(\u06f1\u06f0):\r\n\tvalue = randint(\u06f0, \u06f1\u06f0)\r\n\tprint(value)<\/pre>\n<p style=\"text-align: justify;\"><span style=\"font-size: 16px;\">\u0628\u0627 \u0627\u062c\u0631\u0627\u06cc \u0642\u0637\u0639\u0647 \u06a9\u062f \u0628\u0627\u0644\u0627\u060c \u062f\u0647 \u0639\u062f\u062f \u062a\u0635\u0627\u062f\u0641\u06cc \u0635\u062d\u06cc\u062d \u062a\u0648\u0644\u06cc\u062f \u0645\u06cc\u200c\u0634\u0648\u062f.<\/span><\/p>\n<pre class=\"lang:default decode:true \">\u06f2\r\n\u06f9\r\n\u06f1\r\n\u06f4\r\n\u06f1\r\n\u06f7\r\n\u06f7\r\n\u06f7\r\n\u06f1\u06f0\r\n\u06f6<\/pre>\n<p style=\"text-align: justify;\"><strong><span style=\"font-size: 16px;\">\u06f4\u06f0- \u06a9\u062f \u0645\u0627\u0634\u06cc\u0646 \u062d\u0633\u0627\u0628 \u0633\u0627\u062f\u0647<\/span><\/strong><\/p>\n<pre class=\"lang:python decode:true\">def cl(Num1,Num2,Operation):\r\n    if Operation == \"+\":\r\n        return Num1 + Num2\r\n    elif Operation == \"-\":\r\n        return Num1 - Num2\r\n    elif Operation == \"*\":\r\n        return Num1 * Num2\r\n    elif Operation == \"\/\":\r\n        return Num1 \/ Num2\r\n    else:\r\n        print(\"Undefined !!\")\r\nNum1 = int(input(\"Please enter the first number:\"))\r\nNum2 = int(input(\"Please enter the second number:\"))        \r\nOperation = input(\"Operation?\")\r\nprint(cl(Num1,Num2,Operation))<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u067e\u0627\u06cc\u062a\u0648\u0646 \u0628\u0647 \u06cc\u06a9\u06cc \u0627\u0632 \u0645\u062d\u0628\u0648\u0628\u200c\u062a\u0631\u06cc\u0646 \u0632\u0628\u0627\u0646\u200c\u0647\u0627\u06cc\u06cc \u062a\u0628\u062f\u06cc\u0644 \u0634\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u062d\u0648\u0632\u0647\u200c\u0647\u0627\u06cc \u0639\u0644\u0645 \u062f\u0627\u062f\u0647 \u0648 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646\u060c \u062a\u0648\u0633\u0639\u0647 \u0648\u0628\u060c \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a\u200c\u0646\u0648\u06cc\u0633\u06cc\u060c \u0627\u062a\u0648\u0645\u0627\u0633\u06cc\u0648\u0646 \u0648 \u062d\u0648\u0632\u0647\u200c\u0647\u0627\u06cc \u0628\u0633\u06cc\u0627\u0631 \u062f\u06cc\u06af\u0631 \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f. \u0628\u062e\u0634\u06cc \u0627\u0632 \u062f\u0644\u06cc\u0644 \u0627\u06cc\u0646 \u0645\u062d\u0628\u0648\u0628\u06cc\u062a \u06af\u0633\u062a\u0631\u062f\u0647\u060c \u0633\u0627\u062f\u06af\u06cc \u0648 \u0633\u0647\u0648\u0644\u062a \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0622\u0646 \u0627\u0633\u062a. \u062f\u0631 \u0627\u06cc\u0646 \u0648\u0628 \u0646\u0648\u0634\u062a \u0628\u0647 \u0637\u0648\u0631 \u0645\u062e\u062a\u0635\u0631 \u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0641\u06cc\u062f \u067e\u0627\u06cc\u062a\u0648\u0646 \u0631\u0627 \u0645\u0639\u0631\u0641\u06cc&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1239,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[458,399,6,2175],"tags":[417,95,381,459,109,382],"class_list":["post-7717","post","type-post","status-publish","format-standard","has-post-thumbnail","category-__","category-399","category-6","category-2175","tag-programming","tag-programming-in-python","tag-python","tag-459","tag-109","tag-382"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0647\u0645 \u067e\u0627\u06cc\u062a\u0648\u0646 \u06a9\u0647 \u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u062f - \u0633\u06cc\u062f \u0645\u0647\u062f\u06cc \u0633\u0644\u06cc\u0645\u06cc<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mehdisalimi.ir\/?p=7717\" \/>\n<meta property=\"og:locale\" content=\"fa_IR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0647\u0645 \u067e\u0627\u06cc\u062a\u0648\u0646 \u06a9\u0647 \u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u062f - \u0633\u06cc\u062f \u0645\u0647\u062f\u06cc \u0633\u0644\u06cc\u0645\u06cc\" \/>\n<meta property=\"og:description\" content=\"\u067e\u0627\u06cc\u062a\u0648\u0646 \u0628\u0647 \u06cc\u06a9\u06cc \u0627\u0632 \u0645\u062d\u0628\u0648\u0628\u200c\u062a\u0631\u06cc\u0646 \u0632\u0628\u0627\u0646\u200c\u0647\u0627\u06cc\u06cc \u062a\u0628\u062f\u06cc\u0644 \u0634\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u062d\u0648\u0632\u0647\u200c\u0647\u0627\u06cc \u0639\u0644\u0645 \u062f\u0627\u062f\u0647 \u0648 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646\u060c \u062a\u0648\u0633\u0639\u0647 \u0648\u0628\u060c \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a\u200c\u0646\u0648\u06cc\u0633\u06cc\u060c \u0627\u062a\u0648\u0645\u0627\u0633\u06cc\u0648\u0646 \u0648 \u062d\u0648\u0632\u0647\u200c\u0647\u0627\u06cc \u0628\u0633\u06cc\u0627\u0631 \u062f\u06cc\u06af\u0631 \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f. \u0628\u062e\u0634\u06cc \u0627\u0632 \u062f\u0644\u06cc\u0644 \u0627\u06cc\u0646 \u0645\u062d\u0628\u0648\u0628\u06cc\u062a \u06af\u0633\u062a\u0631\u062f\u0647\u060c \u0633\u0627\u062f\u06af\u06cc \u0648 \u0633\u0647\u0648\u0644\u062a \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0622\u0646 \u0627\u0633\u062a. \u062f\u0631 \u0627\u06cc\u0646 \u0648\u0628 \u0646\u0648\u0634\u062a \u0628\u0647 \u0637\u0648\u0631 \u0645\u062e\u062a\u0635\u0631 \u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0641\u06cc\u062f \u067e\u0627\u06cc\u062a\u0648\u0646 \u0631\u0627 \u0645\u0639\u0631\u0641\u06cc&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mehdisalimi.ir\/?p=7717\" \/>\n<meta property=\"og:site_name\" content=\"\u0633\u06cc\u062f \u0645\u0647\u062f\u06cc \u0633\u0644\u06cc\u0645\u06cc\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/mehdisalimi13\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/mehdisalimi13\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-07T08:07:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-07T12:27:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mehdisalimi.ir\/wp-content\/uploads\/Python1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mehd!Salimi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/mehdisalimi13\" \/>\n<meta name=\"twitter:site\" content=\"@mehdisalimi13\" \/>\n<meta name=\"twitter:label1\" content=\"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mehd!Salimi\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u062f\u0642\u06cc\u0642\u0647\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/?p=7717#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/?p=7717\"},\"author\":{\"name\":\"Mehd!Salimi\",\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/#\\\/schema\\\/person\\\/aa4ebf7fb5115362f325b292af001e65\"},\"headline\":\"\u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0647\u0645 \u067e\u0627\u06cc\u062a\u0648\u0646 \u06a9\u0647 \u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u062f\",\"datePublished\":\"2021-02-07T08:07:57+00:00\",\"dateModified\":\"2021-02-07T12:27:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/?p=7717\"},\"wordCount\":105,\"publisher\":{\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/#\\\/schema\\\/person\\\/aa4ebf7fb5115362f325b292af001e65\"},\"image\":{\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/?p=7717#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/mehdisalimi.ir\\\/wp-content\\\/uploads\\\/Python1.jpg\",\"keywords\":[\"Programming\",\"Programming in Python\",\"Python\",\"\u0622\u0645\u0648\u0632\u0634 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u067e\u0627\u06cc\u062a\u0648\u0646\",\"\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\",\"\u067e\u0627\u06cc\u062a\u0648\u0646\"],\"articleSection\":[\"#\u0628\u0631\u0646\u0627\u0645\u0647_\u0646\u0648\u06cc\u0633\u06cc_\u067e\u0627\u06cc\u062a\u0648\u0646\",\"\u0622\u0645\u0648\u0632\u0634\",\"\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\",\"\u0645\u062c\u0644\u0647 \u0641\u0646\u0627\u0648\u0631\u06cc\"],\"inLanguage\":\"fa-IR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/?p=7717\",\"url\":\"https:\\\/\\\/mehdisalimi.ir\\\/?p=7717\",\"name\":\"\u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0647\u0645 \u067e\u0627\u06cc\u062a\u0648\u0646 \u06a9\u0647 \u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u062f - \u0633\u06cc\u062f \u0645\u0647\u062f\u06cc \u0633\u0644\u06cc\u0645\u06cc\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/?p=7717#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/?p=7717#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/mehdisalimi.ir\\\/wp-content\\\/uploads\\\/Python1.jpg\",\"datePublished\":\"2021-02-07T08:07:57+00:00\",\"dateModified\":\"2021-02-07T12:27:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/?p=7717#breadcrumb\"},\"inLanguage\":\"fa-IR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/mehdisalimi.ir\\\/?p=7717\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/?p=7717#primaryimage\",\"url\":\"https:\\\/\\\/mehdisalimi.ir\\\/wp-content\\\/uploads\\\/Python1.jpg\",\"contentUrl\":\"https:\\\/\\\/mehdisalimi.ir\\\/wp-content\\\/uploads\\\/Python1.jpg\",\"width\":600,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/?p=7717#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u062e\u0627\u0646\u0647\",\"item\":\"https:\\\/\\\/mehdisalimi.ir\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0647\u0645 \u067e\u0627\u06cc\u062a\u0648\u0646 \u06a9\u0647 \u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u062f\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/#website\",\"url\":\"https:\\\/\\\/mehdisalimi.ir\\\/\",\"name\":\"\u0633\u06cc\u062f \u0645\u0647\u062f\u06cc \u0633\u0644\u06cc\u0645\u06cc\",\"description\":\"[\u06cc\u0627\u062f\u062f\u0627\u0634\u062a \u0647\u0627 \u0648 \u0647\u0631 \u0627\u0632 \u06af\u0627\u0647\u06cc \u0686\u0646\u062f \u062e\u0637 \u06a9\u062f]\",\"publisher\":{\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/#\\\/schema\\\/person\\\/aa4ebf7fb5115362f325b292af001e65\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/mehdisalimi.ir\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fa-IR\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/#\\\/schema\\\/person\\\/aa4ebf7fb5115362f325b292af001e65\",\"name\":\"Mehd!Salimi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fa-IR\",\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/llog2.png\",\"url\":\"https:\\\/\\\/mehdisalimi.ir\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/llog2.png\",\"contentUrl\":\"https:\\\/\\\/mehdisalimi.ir\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/llog2.png\",\"width\":450,\"height\":180,\"caption\":\"Mehd!Salimi\"},\"logo\":{\"@id\":\"https:\\\/\\\/mehdisalimi.ir\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/llog2.png\"},\"sameAs\":[\"http:\\\/\\\/www.mehdisalimi.ir\",\"https:\\\/\\\/www.facebook.com\\\/mehdisalimi13\",\"https:\\\/\\\/ir.linkedin.com\\\/in\\\/mehdisalimi13\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/mehdisalimi13\"],\"url\":\"https:\\\/\\\/mehdisalimi.ir\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0647\u0645 \u067e\u0627\u06cc\u062a\u0648\u0646 \u06a9\u0647 \u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u062f - \u0633\u06cc\u062f \u0645\u0647\u062f\u06cc \u0633\u0644\u06cc\u0645\u06cc","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mehdisalimi.ir\/?p=7717","og_locale":"fa_IR","og_type":"article","og_title":"\u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0647\u0645 \u067e\u0627\u06cc\u062a\u0648\u0646 \u06a9\u0647 \u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u062f - \u0633\u06cc\u062f \u0645\u0647\u062f\u06cc \u0633\u0644\u06cc\u0645\u06cc","og_description":"\u067e\u0627\u06cc\u062a\u0648\u0646 \u0628\u0647 \u06cc\u06a9\u06cc \u0627\u0632 \u0645\u062d\u0628\u0648\u0628\u200c\u062a\u0631\u06cc\u0646 \u0632\u0628\u0627\u0646\u200c\u0647\u0627\u06cc\u06cc \u062a\u0628\u062f\u06cc\u0644 \u0634\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u062d\u0648\u0632\u0647\u200c\u0647\u0627\u06cc \u0639\u0644\u0645 \u062f\u0627\u062f\u0647 \u0648 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646\u060c \u062a\u0648\u0633\u0639\u0647 \u0648\u0628\u060c \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a\u200c\u0646\u0648\u06cc\u0633\u06cc\u060c \u0627\u062a\u0648\u0645\u0627\u0633\u06cc\u0648\u0646 \u0648 \u062d\u0648\u0632\u0647\u200c\u0647\u0627\u06cc \u0628\u0633\u06cc\u0627\u0631 \u062f\u06cc\u06af\u0631 \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0642\u0631\u0627\u0631 \u0645\u06cc\u200c\u06af\u06cc\u0631\u062f. \u0628\u062e\u0634\u06cc \u0627\u0632 \u062f\u0644\u06cc\u0644 \u0627\u06cc\u0646 \u0645\u062d\u0628\u0648\u0628\u06cc\u062a \u06af\u0633\u062a\u0631\u062f\u0647\u060c \u0633\u0627\u062f\u06af\u06cc \u0648 \u0633\u0647\u0648\u0644\u062a \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0622\u0646 \u0627\u0633\u062a. \u062f\u0631 \u0627\u06cc\u0646 \u0648\u0628 \u0646\u0648\u0634\u062a \u0628\u0647 \u0637\u0648\u0631 \u0645\u062e\u062a\u0635\u0631 \u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0641\u06cc\u062f \u067e\u0627\u06cc\u062a\u0648\u0646 \u0631\u0627 \u0645\u0639\u0631\u0641\u06cc&hellip;","og_url":"https:\/\/mehdisalimi.ir\/?p=7717","og_site_name":"\u0633\u06cc\u062f \u0645\u0647\u062f\u06cc \u0633\u0644\u06cc\u0645\u06cc","article_publisher":"https:\/\/www.facebook.com\/mehdisalimi13","article_author":"https:\/\/www.facebook.com\/mehdisalimi13","article_published_time":"2021-02-07T08:07:57+00:00","article_modified_time":"2021-02-07T12:27:11+00:00","og_image":[{"width":600,"height":400,"url":"https:\/\/mehdisalimi.ir\/wp-content\/uploads\/Python1.jpg","type":"image\/jpeg"}],"author":"Mehd!Salimi","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/mehdisalimi13","twitter_site":"@mehdisalimi13","twitter_misc":{"\u0646\u0648\u0634\u062a\u0647\u200c\u0634\u062f\u0647 \u0628\u062f\u0633\u062a":"Mehd!Salimi","\u0632\u0645\u0627\u0646 \u062a\u0642\u0631\u06cc\u0628\u06cc \u0628\u0631\u0627\u06cc \u062e\u0648\u0627\u0646\u062f\u0646":"5 \u062f\u0642\u06cc\u0642\u0647"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mehdisalimi.ir\/?p=7717#article","isPartOf":{"@id":"https:\/\/mehdisalimi.ir\/?p=7717"},"author":{"name":"Mehd!Salimi","@id":"https:\/\/mehdisalimi.ir\/#\/schema\/person\/aa4ebf7fb5115362f325b292af001e65"},"headline":"\u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0647\u0645 \u067e\u0627\u06cc\u062a\u0648\u0646 \u06a9\u0647 \u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u062f","datePublished":"2021-02-07T08:07:57+00:00","dateModified":"2021-02-07T12:27:11+00:00","mainEntityOfPage":{"@id":"https:\/\/mehdisalimi.ir\/?p=7717"},"wordCount":105,"publisher":{"@id":"https:\/\/mehdisalimi.ir\/#\/schema\/person\/aa4ebf7fb5115362f325b292af001e65"},"image":{"@id":"https:\/\/mehdisalimi.ir\/?p=7717#primaryimage"},"thumbnailUrl":"https:\/\/mehdisalimi.ir\/wp-content\/uploads\/Python1.jpg","keywords":["Programming","Programming in Python","Python","\u0622\u0645\u0648\u0632\u0634 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u067e\u0627\u06cc\u062a\u0648\u0646","\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc","\u067e\u0627\u06cc\u062a\u0648\u0646"],"articleSection":["#\u0628\u0631\u0646\u0627\u0645\u0647_\u0646\u0648\u06cc\u0633\u06cc_\u067e\u0627\u06cc\u062a\u0648\u0646","\u0622\u0645\u0648\u0632\u0634","\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc","\u0645\u062c\u0644\u0647 \u0641\u0646\u0627\u0648\u0631\u06cc"],"inLanguage":"fa-IR"},{"@type":"WebPage","@id":"https:\/\/mehdisalimi.ir\/?p=7717","url":"https:\/\/mehdisalimi.ir\/?p=7717","name":"\u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0647\u0645 \u067e\u0627\u06cc\u062a\u0648\u0646 \u06a9\u0647 \u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u062f - \u0633\u06cc\u062f \u0645\u0647\u062f\u06cc \u0633\u0644\u06cc\u0645\u06cc","isPartOf":{"@id":"https:\/\/mehdisalimi.ir\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mehdisalimi.ir\/?p=7717#primaryimage"},"image":{"@id":"https:\/\/mehdisalimi.ir\/?p=7717#primaryimage"},"thumbnailUrl":"https:\/\/mehdisalimi.ir\/wp-content\/uploads\/Python1.jpg","datePublished":"2021-02-07T08:07:57+00:00","dateModified":"2021-02-07T12:27:11+00:00","breadcrumb":{"@id":"https:\/\/mehdisalimi.ir\/?p=7717#breadcrumb"},"inLanguage":"fa-IR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mehdisalimi.ir\/?p=7717"]}]},{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/mehdisalimi.ir\/?p=7717#primaryimage","url":"https:\/\/mehdisalimi.ir\/wp-content\/uploads\/Python1.jpg","contentUrl":"https:\/\/mehdisalimi.ir\/wp-content\/uploads\/Python1.jpg","width":600,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/mehdisalimi.ir\/?p=7717#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u062e\u0627\u0646\u0647","item":"https:\/\/mehdisalimi.ir\/"},{"@type":"ListItem","position":2,"name":"\u06f4\u06f0 \u0642\u0637\u0639\u0647 \u06a9\u062f \u0645\u0647\u0645 \u067e\u0627\u06cc\u062a\u0648\u0646 \u06a9\u0647 \u0647\u0631 \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0628\u0627\u06cc\u062f \u0628\u062f\u0627\u0646\u062f"}]},{"@type":"WebSite","@id":"https:\/\/mehdisalimi.ir\/#website","url":"https:\/\/mehdisalimi.ir\/","name":"\u0633\u06cc\u062f \u0645\u0647\u062f\u06cc \u0633\u0644\u06cc\u0645\u06cc","description":"[\u06cc\u0627\u062f\u062f\u0627\u0634\u062a \u0647\u0627 \u0648 \u0647\u0631 \u0627\u0632 \u06af\u0627\u0647\u06cc \u0686\u0646\u062f \u062e\u0637 \u06a9\u062f]","publisher":{"@id":"https:\/\/mehdisalimi.ir\/#\/schema\/person\/aa4ebf7fb5115362f325b292af001e65"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mehdisalimi.ir\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fa-IR"},{"@type":["Person","Organization"],"@id":"https:\/\/mehdisalimi.ir\/#\/schema\/person\/aa4ebf7fb5115362f325b292af001e65","name":"Mehd!Salimi","image":{"@type":"ImageObject","inLanguage":"fa-IR","@id":"https:\/\/mehdisalimi.ir\/wp-content\/uploads\/2020\/04\/llog2.png","url":"https:\/\/mehdisalimi.ir\/wp-content\/uploads\/2020\/04\/llog2.png","contentUrl":"https:\/\/mehdisalimi.ir\/wp-content\/uploads\/2020\/04\/llog2.png","width":450,"height":180,"caption":"Mehd!Salimi"},"logo":{"@id":"https:\/\/mehdisalimi.ir\/wp-content\/uploads\/2020\/04\/llog2.png"},"sameAs":["http:\/\/www.mehdisalimi.ir","https:\/\/www.facebook.com\/mehdisalimi13","https:\/\/ir.linkedin.com\/in\/mehdisalimi13","https:\/\/x.com\/https:\/\/twitter.com\/mehdisalimi13"],"url":"https:\/\/mehdisalimi.ir\/?author=1"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mehdisalimi.ir\/index.php?rest_route=\/wp\/v2\/posts\/7717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mehdisalimi.ir\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mehdisalimi.ir\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mehdisalimi.ir\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mehdisalimi.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7717"}],"version-history":[{"count":6,"href":"https:\/\/mehdisalimi.ir\/index.php?rest_route=\/wp\/v2\/posts\/7717\/revisions"}],"predecessor-version":[{"id":7724,"href":"https:\/\/mehdisalimi.ir\/index.php?rest_route=\/wp\/v2\/posts\/7717\/revisions\/7724"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mehdisalimi.ir\/index.php?rest_route=\/wp\/v2\/media\/1239"}],"wp:attachment":[{"href":"https:\/\/mehdisalimi.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7717"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mehdisalimi.ir\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7717"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mehdisalimi.ir\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}