DEV Community

Haider Ali
Haider Ali

Posted on • Updated on


New Feature in Python 3.10

Python 3.10 will be released on 4 October 2021, there is a new feature match do you know JavaScript, you know how switch works the no need to worry it works same as that but if you don't here are some examples.

name = 'python'
match name:
    case 'java':
    case 'python':
Enter fullscreen mode Exit fullscreen mode

It works like a if, elif, and else together

Top comments (3)

shapeshapa profile image

i always love the case match from c#

rahulkurup profile image
rahul kurup

i don't know python, but shouldn't it be corrected like this -
match python: -> match name:

haider__ali profile image
Haider Ali

Oh sorry I realized it’s a typo thanks

Advice For Junior Developers

Advice from a career of 15+ years for new and beginner developers just getting started on their journey.