Can i use python3 feature in python2 based code? | Sololearn: Learn to code for FREE!

+3

Can i use python3 feature in python2 based code?

My code is python2 based but now I've to use python3 features into it, is this possible without upgrading or I've to upgrade my entire code to python3. If I need to upgrade, is there any tool for it. Thanks

7/30/2019 1:51:18 PM

Initiator

4 Answers

New Answer

+7

Hello! You'll have to convert your code from Python2 to Python3 indeed! Some resources can help you: * The unix tool "2to3" * pythonconverter.com Good luck! 😉

+1

You have to convert. Use above mentioned tools :)

0

Thank you

0

There is some stuff you can import from "module" future which provides some things that python3 offers.