DEV Community

A K I L A N
A K I L A N

Posted on

PYTHON DAY 2

one of the python feature is python is simple

  1. Difference between python2 and python3

ocusing on the following libraries and modules.

Division operator - in p2 automatically remove decimals,(p3 keeps the decimal)

print function - in p2 for print statement no bracket needed ,(p3 brackets are needed)

Unicode - in p2 string are ASCII by default,& uncicode must be defined seperated (in p3 string are unicode by defualt)

xrange - xrange is used in p2 to find number between (in p3 that hs been removed the use range pro that if we use xrange that shows error)

-Error Handling - p2 uses a comma to bind the exception( in p3 uses as keyword )

- future module - future module allows Python 2 code to adopt Python 3 features early, making migration easier.

2.What is python IDLE ?

  • idle(integrated development and learning Environment) is the default .lightweight (iDE) bundled directly with the Standrad python installtion

Top comments (0)