How to write code that works on both Python 2 and Python 3?

Published: 09 October 2017
on channel: Real Python
2,658
48

https://dbader.org/python-tricks ► New features available in Python 3 that let you write better code

Python question from a reader:

"How to write code that works on both Python 2 and Python 3?"

We'll discuss backwards compatibility in the Python world and the "six" module you can use to write code that works on Python 2 and Python 3 unmodified. Hopefully this will make the age-old "Python 2 vs Python 3" decision a little easier for you.

Got a question? Leave a comment with your Python or general software dev question on this video and I'll try to cover it question in one of the next "#PythonQ&A" videos.

Full playlist here:    • Python Q&A with Dan – Your Python/Car...  

FREE COURSE – "5 Thoughts on Mastering Python" https://dbader.org/python-mastery

SUBSCRIBE TO THIS CHANNEL: https://dbader.org/youtube

* * *

► Python Developer MUGS, T-SHIRTS & MORE: https://nerdlettering.com

► PythonistaCafe – A peer-to-peer learning community for Python developers: https://www.pythonistacafe.com

FREE Python Coding Tutorials & News:
» Python Tutorials: https://dbader.org
» Python News on Twitter:   / @dbader_org  
» Weekly Tips for Pythonistas: https://dbader.org/newsletter
» Subscribe to this channel: https://dbader.org/youtube


On this page of the site you can watch the video online How to write code that works on both Python 2 and Python 3? with a duration of hours minute second in good quality, which was uploaded by the user Real Python 09 October 2017, share the link with friends and acquaintances, this video has already been watched 2,658 times on youtube and it was liked by 48 viewers. Enjoy your viewing!