Features of Python 3.9 with Examples and Installation in Windows

20 Likes 1 Comment
features of python 2.9

Hey, Shouters!! Today we have come up with the features of python 3.9 and examples to understand the new features and its installation in Windows.

Python 3.9.0a6 version is released on 28 April 2020. It is an early developer preview of 3.9.

This release 3.9.0a6 is the last out of sixth planned alpha releases by python developer. Alpha releases an intended to make it easier to test the current state of new features and bug fixes and to test the release process. During the alpha phase, features may be added up until the start of the beta phase, and if it’s necessary, it may be modified or deleted up until the release candidate phase.

This 3.9.0a6 is a preview release and its use is not recommended for the production environment.

New Features of Python 3.9.0a6

Many new features of 3.9 are still planned and written, so some of them are:

>> Adding the merge operator the pipe operator(|) and update pipe operator equals to(|=) operator to built-in dict class. So Dictionary Union- Merge operators have been added in dict as per PEP 584.

So basically what it means is that the dictionary union will return a new dictionary where the left operand is merged with the right operand. But the condition is both the operand must be a dictionary. If the key appears in both the dictionaries, then only the last value from the dictionary on the right-hand side will be used.

For Example:

let’s say-

>> x={‘Copy’: 1, ‘Pen’: 2, ‘Furniture’:3}

and another;

>> y={‘Furniture’: ‘Table’, ‘Chair’, ‘Bench’}

After this print,

>> print(x|y)

on running the program it will give a new dictionary with second dictionary y’s key-value pairs merged with the first dictionary x.

>> Output= {”Copy’:1, ‘Pen’:2, ‘Furniture’: ‘Table’, ‘Chair’, ‘Bench’}

For (y|x) from above example;

>> print(y|x)

And we can see that on running a new dictionary with second dictionary x’s key-value pairs merged with the first one dictionary x like this as an output.

>> Output= {‘Copy’:1, ‘Pen’:2, ‘Furniture’: ‘Table’, ‘Chair’: ‘Bench’}

{‘Furniture’: 3, ‘Chair’: ‘Bench’, ‘Copy’: 1, ‘Pen’: 2}

Some Other Features:

removeprefix() and removesuffix() a per PEP 616. These methods have been added for relief to easily remove an unneeded prefix as well as suffix from a string.

>> Type Hinting Generics in standard collection as per PEP 585

>> Flexible functions and variable annotations as per PEP 593.

>> Python adopts a stable annual release frequency as per PEP 602.A

>> A number of standard library modules are now using

the stable ABI’s as per PEP.

>> New PEG parser for CPython as per PEP 617.

>> Unicode support is updated

Download and Install Python 3.9 on windows:

>> Search on Google for Python or you can directly go official link Python.org. After searching for the link, you will be redirected to this page.

>>Here under downloads go to Windows.

>>Window user so click here under stable release you can see that the latest stable release is python 3.8.3 but we have to download python 3.9 version but it is a Beta version so it will be under Pre-release. So as you can see python 3.9.0b3 which means the third beta version of python 3.9 is here of June 9.

We will download Windows into state is x64 executable installer.

Once you click on it downloading will be started.

>> You will be redirected to this screen and now mark the blocks of Install launcher for all users(recommended) and Add Python 3.9 to PATH.

And Then click on Install Now.

>>Now after clicking on Install now, the setup progress will be started and it will take some time depending on the pc. It will ask for administrative permission too so click on yes for permission.

>> Click on close.

Now Python 3.9 installation has been installed.

So to verify Go to start menu and it will show the recent download IDLE. Click on it.

And finally you will see the Python 3.9 is downloaded as well as installed.

I hope you liked the features of python 3.9 and if you have any suggestions or features not covered. Please write your valuable comments below.

Recommended Posts-

  1. Introduction to Python and Environment Setup
  2. How to install IDE in Windows, Mac, and Linux
  3. Python Program to Check a Year is Leap Year or Not
  4. Python Program to Check a Palindrome Number
  5. Word Guessing Game in Python

You might like

Avatar

About the Author: Anshika Gupta

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami