

{"id":11026,"date":"2018-03-17T06:27:54","date_gmt":"2018-03-17T06:27:54","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=11026"},"modified":"2026-04-25T12:48:55","modified_gmt":"2026-04-25T07:18:55","slug":"whats-new-in-python-3-6","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/","title":{"rendered":"What&#8217;s New in Python 3.6 ? | New Features in Python 3.6"},"content":{"rendered":"<p>Python 3.6 has come up with an upgrade, f-strings have made typing easier and dictionaries faster, which uses a lot of memory. This version has turned Python into a powerhouse in today&#8217;s world, and it has made it modern and a high-performance language.<\/p>\n<p>In this article on Python 3.6, we will discuss the following new features in Python 3.6. Moreover, we will discuss<\/p>\n<ul>\n<li>New Syntax Features of Python 3.6<\/li>\n<li>New Modules in Python 3.6<\/li>\n<li>Improved Python 3.6 Modules<\/li>\n<\/ul>\n<p>So, let&#8217;s start the Python 3.6 Tutorial.<\/p>\n<div id=\"attachment_11029\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Whats-new-in-Python-3.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-11029\" class=\"wp-image-11029 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Whats-new-in-Python-3.jpg\" alt=\"What's New in Python 3.6 ? | New Features in Python 3.6\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Whats-new-in-Python-3.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Whats-new-in-Python-3-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Whats-new-in-Python-3-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Whats-new-in-Python-3-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Whats-new-in-Python-3-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-11029\" class=\"wp-caption-text\">What&#8217;s New in Python 3.6? | New Features in Python 3.6<\/p><\/div>\n<h3>What&#8217;s new in Python 3.6?<\/h3>\n<p>We know that the future belongs to Python 3.x. But we have a number of versions in Python 3000. For example, Python 3.3.3 and Python 3.4.3. The latest version of Python is 3.6. So, let\u2019s see what&#8217;s new in Python 3.6 and how it is different from older versions, Python 3.6 performance, and features.<\/p>\n<h3>New Syntax Features\u00a0 of Python 3.6<\/h3>\n<p>With Python 3.6, we see some new syntax features. Let\u2019s take a look.<\/p>\n<h4><strong>1. PEP 498 (Formatted String Literals)<\/strong><\/h4>\n<p>You guessed it right. PEP 498 introduces f-strings.<\/p>\n<p>An f-string is a string that you can format to put values inside it. For this, we precede the string with an \u2018f\u2019 or an \u2018F\u2019. We mention the variables inside curly braces.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; hometown,city='Ahmedabad','Indore'\r\n&gt;&gt;&gt; print(f\"I love {hometown}, but I live in {city}\")<\/pre>\n<p>I love Ahmedabad, but I live in Indore<\/p>\n<p>For more on f-strings, read<strong> <a href=\"https:\/\/data-flair.training\/blogs\/python-strings\/\">Python Strings<\/a><\/strong>.<\/p>\n<h4><strong>2. PEP 526 (Syntax for Variable Annotations)<\/strong><\/h4>\n<p>PEP 484 standardizes type annotations for function parameters. We also call these type hints.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; class A:\r\n    name:str\r\n&gt;&gt;&gt; A.__annotations__\r\n{'name': &lt;class 'str'&gt;}<\/pre>\n<p>Annotations do not convey meaning to the interpreter and are of use to third-party tools and libraries.<\/p>\n<h4><strong>3. PEP 515 (Underscores in Numeric Literals)<\/strong><\/h4>\n<p>With PEP 515, we can use underscores in numeric literals- between digits and after base specifiers.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; 0x_FF_FE_FF_FE<\/pre>\n<p>4294901758<\/p>\n<h4><strong>4. PEP 525 (Asynchronous Generators)<\/strong><\/h4>\n<p>PEP 492 introduced native coroutines and async\/await syntax. Unlike Python 3.5, Python 3.6 can have await and yield in the same function body. So, we can define asynchronous generators:<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; async def ticker(delay, to):\r\n   \"\"\"Yield numbers from 0 to *to* every *delay* seconds.\"\"\"\r\n   for i in range(to):\r\n       yield i\r\n       await asyncio.sleep(delay)<\/pre>\n<p>This makes code faster and more concise.<\/p>\n<h4><strong>5. PEP 530 (Asynchronous Comprehensions)<\/strong><\/h4>\n<p>With PEP 530, you can use async for in lists, sets, dict comprehensions, and generator expressions.<\/p>\n<p>result = [i async for i in aiter() if i % 2]<\/p>\n<h4><strong>6. PEP 487 (Simpler Customization of Class Creation)<\/strong><\/h4>\n<p>Now, we don\u2019t need a metaclass to customize subclass creation. Whenever we create a new subclass, it calls the __init_subclass__ classmethod.<\/p>\n<pre class=\"EnlighterJSRAW\">class PluginBase:\r\n   subclasses = []\r\n   def __init_subclass__(cls, **kwargs):\r\n       super().__init_subclass__(**kwargs)\r\n       cls.subclasses.append(cls)\r\nclass Plugin1(PluginBase): pass\r\nclass Plugin2(PluginBase): pass<\/pre>\n<h4><strong>7. PEP 495 (Local Time Disambiguation)<\/strong><\/h4>\n<p>PEP 495 introduces the \u2018fold\u2019 attribute to instances of the datetime. datetime and datetime.time classes. This way, it can differentiate between two moments in time with the same local times.<\/p>\n<h4><strong>8. PEP 529 (Change Windows filesystem encoding to UTF-8)<\/strong><\/h4>\n<p>With Python 3.6, no data loss occurs when we use byte paths on Windows.<\/p>\n<h4><strong>9. PEP 528 (Change Windows console encoding to UTF-8)<\/strong><\/h4>\n<p>Now, the default console on Windows accepts all Unicode characters. It also provides correctly-read str objects to Python code. Now, sys.stdin, sys.stdout, and sys.stderr default to utf-8 encoding.<\/p>\n<h4><strong>10. PEP 520 (Preserving Class Attribute Definition Order)<\/strong><\/h4>\n<p>With PEP 520, the natural ordering of attributes in a class is preserved in the class\u2019 __dict__ attribute. Now, the default effective class \u2018execution\u2019 namespace is an insertion-order-preserving mapping.<\/p>\n<p>k. PEP 468 (Preserving Keyword Argument Order)<\/p>\n<p>Python now guarantees that **kwargs in a function signature is an insertion-order-preserving mapping.<\/p>\n<h4><strong>11. PEP 523 (Adding a frame evaluation API to CPython)<\/strong><\/h4>\n<p>PEP 523 introduces an API to make frame evaluation pluggable at the C level. This way, tools like debuggers and JITs can intercept frame evaluation before the Python code even begins to execute.<\/p>\n<p>These are the Python 3.6 new feature syntax.<\/p>\n<p><strong>Read:<a href=\"https:\/\/data-flair.training\/blogs\/feautres-python\/\">13 Unique Features of the Python Programming Language<\/a><\/strong><\/p>\n<h3>Other Additions in Python 3.6<\/h3>\n<ul>\n<li>The PYTHONMALLOC environment variable allows us to set the Python memory allocators and install debug hooks.<\/li>\n<li>New dict implementation- Now, dict() uses between 20% and 25% less memory compared to Python 3.5.<\/li>\n<li>Earlier, it would give you a SyntaxWarning if you did not use a \u2018global\u2019 or \u2018nonlocal\u2019 statement before the first use of the affected name in that scope.<\/li>\n<li>Now, Import raises the new exception ModuleNotFoundError, which is a subclass of ImportError. Code that checks for ImportError still works.<\/li>\n<li>The interpreter now abbreviates long sequences of repeated traceback lines as &#8220;[Previous\u00a0line\u00a0repeated\u00a0{count}\u00a0more\u00a0times]&#8221;.<\/li>\n<li>Class methods that rely on zero-argument super() now work perfectly when we call them from metaclass methods at class creation.<\/li>\n<li>Now, we can set a special method to None when we want to indicate that the operation is unavailable. For instance, a class that sets __iter__() to None isn\u2019t iterable.<\/li>\n<\/ul>\n<p>There is something extremely new in Python 3.6.<\/p>\n<h3>New Modules in Python 3.6<\/h3>\n<h4><strong>a. secrets<\/strong><\/h4>\n<p>Python 3.6 introduces a new module, \u2018secrets\u2019. This module lends us a way to reliably generate cryptographically strong pseudo-random values. Using these, we can manage secrets like account authentication, tokens, and so.<\/p>\n<div id=\"attachment_11038\" style=\"width: 687px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/whats-new-in-python-3.6-secrets-.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-11038\" class=\"wp-image-11038 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/whats-new-in-python-3.6-secrets-.png\" alt=\"What's New in Python 3.6 ? | New Features in Python 3.6\" width=\"677\" height=\"387\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/whats-new-in-python-3.6-secrets-.png 677w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/whats-new-in-python-3.6-secrets--150x86.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/whats-new-in-python-3.6-secrets--300x171.png 300w\" sizes=\"auto, (max-width: 677px) 100vw, 677px\" \/><\/a><p id=\"caption-attachment-11038\" class=\"wp-caption-text\">What&#8217;s new in Python 3.6 &#8211; Secrets<\/p><\/div>\n<p>Any doubt yet in What&#8217;s new in Python 3.6 tutorial, because now there is a long list of Improved modules. Also, refer to this article on<strong><a href=\"https:\/\/data-flair.training\/blogs\/python-modules-vs-packages\/\"> Python Modules vs Packages.<\/a><\/strong><\/p>\n<h3>Improved Python 3.6 Modules<\/h3>\n<p>Why stop at what we have when we can tweak it into something even more awesome? Python 3.6 makes the following improvements:<\/p>\n<p><strong>1. array &#8211; <\/strong>Now, exhausted iterators of array.array stays exhausted even when the iterated array extends. This is consistent with other mutable sequences\u2019 behavior.<\/p>\n<p><strong>2. ast &#8211; <\/strong>Python adds the new ast.Constant AST node. External AST optimizers use them for constant folding.<\/p>\n<p><strong>3. asyncio &#8211; <\/strong>With Python 3.6, the asyncio module is no longer provisional; its API is now stable.<\/p>\n<p><strong>4. binascii &#8211; <\/strong>Now, the function b2a_base64() accepts an optional newline keyword. This way, it can control whether the newline character is appended to the return value.<\/p>\n<p><strong>5. cmath &#8211; <\/strong>Python 3.6 added a new constant cmath.tau(\u03c4).<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; from cmath import tau\r\n&gt;&gt;&gt; tau<\/pre>\n<p>6.283185307179586<\/p>\n<p><strong>6. collections &#8211; <\/strong>Here\u2019s all that is new in the \u2018collections\u2019 module:<\/p>\n<ul>\n<li><strong>Collection ABC-<\/strong> to represent sized iterable container classes.<\/li>\n<li><strong>Reversible ABC-<\/strong> to represent iterable classes. These also provide the method __reversed__().<\/li>\n<li><strong>AsyncGenerator ABC-<\/strong> to represent asynchronous generators.<\/li>\n<\/ul>\n<p>Other than these, the namedtuple() function will now accept an optional keyword argument \u2018module\u2019. Now, the arguments \u2018verbose\u2019 and \u2018rename\u2019 for namedtuple() are keyword-only. Finally, we can now pickle recursive collections.deque instances.<\/p>\n<p><strong>7. concurrent.futures &#8211; <\/strong>Now, the class constructor ThreadPoolExecutor accepts an optional thread_name_prefix argument. This lets us customize thread names for the thread created by the pool.<\/p>\n<p><strong>8. contextlib &#8211; <\/strong>The new contextlib.AbstractContextManager class provides an ABC for context managers. This provides a sensible default implementation for __enter__().<\/p>\n<p><strong>9. datetime &#8211; <\/strong>Python 3.6 has a fold attribute for the datetime and time classes. This disambiguates local time.<\/p>\n<p>The function datetime.isoformat() takes an optional argument \u2018timespec\u2019.<br \/>\nThe function datetime.combine() takes an optional argument tzinfo.<\/p>\n<p><strong>10. decimal &#8211; <\/strong>The decimal module has a new method Decimal.as_integer_ratio(). It returns (n,d)- a pair of integers representing a given Decimal instance as a fraction.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; Decimal('-3.14').as_integer_ratio()<\/pre>\n<p>(-157, 50)<\/p>\n<p><strong>11. distutils &#8211; <\/strong>Python 3.6 removes the default_format attribute from distutils.command.sdist.sdist. Also, now, the formats attribute defaults to [&#8216;gztar&#8217;].<\/p>\n<p><strong>12. encodings &#8211; <\/strong>On Windows, we now have the \u2018oem\u2019 encoding for \u2018CPOEMCP\u2019. We also have the \u2018ansi\u2019 alias for \u2018mbcs\u2019 encoding.<\/p>\n<p><strong>13. enum &#8211; <\/strong>The enum module has two new enumeration base classes- Flag and IntFlags. These define constants that we can combine using bitwise operators.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; from enum import Enum, auto\r\n&gt;&gt;&gt; class Color(Enum):\r\n    red=auto()\r\n    blue=auto()\r\n    green=auto()\r\n&gt;&gt;&gt; list(Color)\r\n[&lt;Color.red: 1&gt;, &lt;Color.blue: 2&gt;, &lt;Color.green: 3&gt;]<\/pre>\n<p><strong>14. faulthandler &#8211; <\/strong>This module installs a handler for Windows exceptions.<\/p>\n<p><strong>15. fileinput &#8211; <\/strong>With Python 3.6, hook_encoded() supports the \u2018errors\u2019 argument.<\/p>\n<p><strong>16. http.client &#8211; <\/strong>Now, chunked encoding request bodies work with both HTTPConnection.request() and endheaders().<\/p>\n<p><strong>17. idlelib and IDLE &#8211; <\/strong>The idlelib package is refactored to give the IDLE a better look and better performance. This also makes the code easier to understand,\u00a0test, and improve.<\/p>\n<p><strong>18. importlib &#8211; <\/strong>Now, importlib raises the exception ModuleNotFoundError when it is unable to find a module. This is a subclass of ImportError.<\/p>\n<p><strong>19. inspect &#8211; <\/strong>Now, the function inspect.signature() reports the implicit .0 parameters that the compiler generates for comprehension and generator expression scopes.<\/p>\n<p><strong>20. json &#8211; <\/strong>Now, json.load() and json.loads() support binary input.<\/p>\n<p><strong>21. logging &#8211; <\/strong>To check if a log file must be reopened, we have WatchedFileHandler.reopenIfNeeded().<\/p>\n<p>Read: <strong><a href=\"https:\/\/data-flair.training\/blogs\/python-collections-module\/\">Python Collections Module<\/a><\/strong><\/p>\n<p><strong>22. math &#8211; <\/strong>We have the new constant tau(\u03c4) in both math and cmath modules.<\/p>\n<p><strong>23. multiprocessing &#8211; <\/strong>We can now nest proxy objects returned by multiprocessing.Manager().<\/p>\n<p><strong>24. x. os &#8211; N<\/strong>ow, scandir() supports bytes paths on Windows. The method close() lets us explicitly close a scandir() iterator.<\/p>\n<p><strong>25. pathlib &#8211; <\/strong>Now, pathlib supports path-like objects.<\/p>\n<p><strong>26. pdb &#8211; <\/strong>Python 3.6 adds a new optional readrc argument to the class constructor. This controls whether .pdbrc files should be read. This is what&#8217;s new in Python 3.6, but this is not it.<\/p>\n<p><strong>27. pickle &#8211; <\/strong>Pickle is the module that helps with serialization. We can now use pickle protocols older than protocol version 4 to pickle objects needing __new__ called with keyword arguments.<\/p>\n<p><strong>28. pickletools &#8211; <\/strong>Now, pickletools.dis() outputs the implicit memo index for the MEMOIZE opcode.<\/p>\n<p><strong>29. ac. pydoc &#8211; <\/strong>With Python 3.6, pydoc has learned to respect the MANPAGER environment variable.<\/p>\n<p><strong>30. random &#8211; <\/strong>With the new random module, choices() returns a list of elements of a certain size. It picks these elements from a given population of optional weights.<\/p>\n<p><strong>31. re &#8211; <\/strong>The module re now has support for modifier spans in regular expressions. For instance, &#8216;(?i:p)ython&#8217; will match \u2018python\u2019 and \u2018Python\u2019, but not \u2018PYTHON\u2019.<\/p>\n<p><strong>32. readline &#8211; <\/strong>The function set_auto_history() can enable\/disable automatic addition of input to the history list.<\/p>\n<p><strong>33. rlcompleter &#8211;<\/strong> We no longer have private and special attribute names unless prefixed with an underscore. Sometimes, you can see a space or colon after some completed keywords.<\/p>\n<p><strong>34. shlex &#8211; <\/strong>To control what characters must be treated as punctuation, shlex now has much improved shell compatibility. This is through the punctuation_chars argument.<\/p>\n<p><strong>35. site &#8211; <\/strong>We can now specify file paths on top of directories to add paths to sys.path in a .pth file.<\/p>\n<p><strong>36. aj. sqlite3 &#8211; <\/strong>Now, sqlite3.Cursor.lastrowid supports the REPLACE statement.<\/p>\n<p><strong>37. ak. socket &#8211; <\/strong>getsockopt() now supports constants SO_DOMAIN, SO_PROTOCOL, SO_PEERSEC, and SO_PASSSEC.<br \/>\nsetsockopt() now supports the setsockopt(level, optname, None, optlen: int) form.<\/p>\n<p><strong>38. socketserver &#8211; <\/strong>The servers based on the socketserver module support the context manager protocol.<\/p>\n<p><strong>39. am. ssl &#8211; <\/strong>Now, ssl supports OpenSSL 1.1.0. Also, SSLContext now has better default configuration for options and ciphers.<\/p>\n<p><strong>40. statistics &#8211; <\/strong>The statistics module has the new harmonic_mean() function.<\/p>\n<p><strong>41. struct &#8211; <\/strong>Now, struct supports IEEE 754 half-precision floats. It does this via the &#8216;e&#8217; format specifier.<\/p>\n<p><strong>42. subprocess &#8211; <\/strong>With Python 3.6, if the child process is still running, the subprocess.Popen destructor emits a ResourceWarning warning.<\/p>\n<p><strong>43. sys &#8211; <\/strong>The function getfilesystemencodeerrors() returns the name of the error mode used to convert between Unicode filenames and byte filenames.<\/p>\n<p><strong>44. telnetlib &#8211; <\/strong>Now, Telnet is a context manager.<\/p>\n<p><strong>45. time &#8211; <\/strong>struct_time attributes tm_gmtoff and tm_zone now work on all platforms.<\/p>\n<p><strong>46. timeit &#8211; <\/strong>When there is substantial (4x) variance between best and worst times, timeit warns.<\/p>\n<p><strong>47. tkinter &#8211; <\/strong>New methods in the tkinter.Variable class include trace_add(), trace_remove() and trace_info().<\/p>\n<p><strong>48. traceback &#8211; <\/strong>Along with the interpreter\u2019s built-in exception display, the traceback module abbreviate long sequences of repeated lines in tracebacks. For instance:<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; def f(): f()\r\n...\r\n&gt;&gt;&gt; f()<\/pre>\n<p>Traceback (most recent call last):<\/p>\n<p>File &#8220;&lt;stdin&gt;&#8221;, line 1, in &lt;module&gt;<\/p>\n<p>File &#8220;&lt;stdin&gt;&#8221;, line 1, in f<\/p>\n<p>File &#8220;&lt;stdin&gt;&#8221;, line 1, in f<\/p>\n<p>File &#8220;&lt;stdin&gt;&#8221;, line 1, in f<\/p>\n<p>[Previous line repeated 995 more times]<\/p>\n<p>RecursionError: maximum recursion depth exceeded<\/p>\n<p><strong>49. aw. tracemalloc &#8211; <\/strong>tracemalloc now supports tracing memory allocations in multiple different address spaces.<\/p>\n<p><strong>50. typing &#8211; <\/strong>This module now has an improved support for generic type aliases. Also, new classes include typing.ContextManager and typing.Collection.<\/p>\n<p><strong>51. unicodedata &#8211; <\/strong>This module now uses data from Unicode 9.0.0.<\/p>\n<p><strong>52. unittest.mock &#8211; <\/strong>New methods include Mock.assert_called() and Mock.assert_called_once().<\/p>\n<p><strong>53. urllib.request &#8211; <\/strong>If an HTTP request has a file or iterable body, other than a bytes object, but no Content-Length header, it does not throw an error. Now, AbstractHTTPHandler uses chunked transfer encoding.<\/p>\n<p><strong>54. urllib.robotparser &#8211; <\/strong>The RobotFileParser now supports the Crawl-delay and Request-rate extensions.<\/p>\n<p><strong>55. venv &#8211; <\/strong>venv now accepts a new parameter- \u00a0\u00a0&#8211;prompt. This is an alternative prefix for the virtual environment.<\/p>\n<p><strong>56. warnings &#8211; <\/strong>The warnings.warn_explicit() function now has an optional \u2018source\u2019 parameter.<\/p>\n<p><strong>57. winreg &#8211; <\/strong>What\u2019s new? The 64-bit integer type REG_QWORD.<\/p>\n<p><strong>58. winsound &#8211; <\/strong>winsound now allows us to pass keyword arguments to Beep, MessageBeep, and PlaySound.<\/p>\n<p><strong>59. bg. xmlrpc.client &#8211; <\/strong>This module now supports unmarshalling additional data types that are used by the Apache XML-RPC implementation for numerics and None.<\/p>\n<p><strong>60. zipfile &#8211; <\/strong>The class method ZipInfo.from_file() allows us to make a ZipInfo instance from a filesystem file.<\/p>\n<p><strong>61. zlib &#8211; <\/strong>We can now pass keyword arguments to functions compress() and decompress().<\/p>\n<p>So, this is all about what&#8217;s new in Python 3.6 Tutorial. Hope you like our explanation.<\/p>\n<h3>Conclusion<\/h3>\n<p>In this article on what&#8217;s new in Python 3.6, we discussed what changes have been made to Python 3.5 to make it Python 3.6. Tell us how you like them, and what&#8217;s new in the Python 3.6 article.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python 3.6 has come up with an upgrade, f-strings have made typing easier and dictionaries faster, which uses a lot of memory. This version has turned Python into a powerhouse in today&#8217;s world, and&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":36528,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[10346,10347,10348,10349,16067],"class_list":["post-11026","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python-3-6","tag-python-3-6-improved-modules","tag-python-3-6-new-features","tag-python-3-6-new-syntax","tag-whats-new-in-python-3-6"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What&#039;s New in Python 3.6 ? | New Features in Python 3.6 - DataFlair<\/title>\n<meta name=\"description\" content=\"Know what&#039;s new in Python 3.6: There are new features in python 3.6, new syntax, new modules in python 3.6 as well as many improved modules.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What&#039;s New in Python 3.6 ? | New Features in Python 3.6 - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Know what&#039;s new in Python 3.6: There are new features in python 3.6, new syntax, new modules in python 3.6 as well as many improved modules.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-03-17T06:27:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-25T07:18:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Whats-new-in-Python-3-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What's New in Python 3.6 ? | New Features in Python 3.6 - DataFlair","description":"Know what's new in Python 3.6: There are new features in python 3.6, new syntax, new modules in python 3.6 as well as many improved modules.","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:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/","og_locale":"en_US","og_type":"article","og_title":"What's New in Python 3.6 ? | New Features in Python 3.6 - DataFlair","og_description":"Know what's new in Python 3.6: There are new features in python 3.6, new syntax, new modules in python 3.6 as well as many improved modules.","og_url":"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-03-17T06:27:54+00:00","article_modified_time":"2026-04-25T07:18:55+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Whats-new-in-Python-3-1.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"What&#8217;s New in Python 3.6 ? | New Features in Python 3.6","datePublished":"2018-03-17T06:27:54+00:00","dateModified":"2026-04-25T07:18:55+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/"},"wordCount":2153,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Whats-new-in-Python-3-1.jpg","keywords":["Python 3.6","Python 3.6 improved modules","python 3.6 new features","Python 3.6 new syntax","what's new in python 3.6"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/","url":"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/","name":"What's New in Python 3.6 ? | New Features in Python 3.6 - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Whats-new-in-Python-3-1.jpg","datePublished":"2018-03-17T06:27:54+00:00","dateModified":"2026-04-25T07:18:55+00:00","description":"Know what's new in Python 3.6: There are new features in python 3.6, new syntax, new modules in python 3.6 as well as many improved modules.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Whats-new-in-Python-3-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/03\/Whats-new-in-Python-3-1.jpg","width":1200,"height":628,"caption":"What's New in Python 3.6 ? | New Features in Python 3.6"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/whats-new-in-python-3-6\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Python Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/python\/"},{"@type":"ListItem","position":3,"name":"What&#8217;s New in Python 3.6 ? | New Features in Python 3.6"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/11026","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=11026"}],"version-history":[{"count":7,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/11026\/revisions"}],"predecessor-version":[{"id":147888,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/11026\/revisions\/147888"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/36528"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=11026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=11026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=11026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}