Python Language Incompatibilities moving from Python 2 to Python 3 Octal Constants

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

In Python 2, an octal literal could be defined as

>>> 0755  # only Python 2

To ensure cross-compatibility, use

0o755  # both Python 2 and Python 3


Got any Python Language Question?