What is the difference between = and == in python?

Answer Posted / glibwaresoftsolutions

- `/` is the true division operator that always returns a float result, even if both operands are integers.
```python
result = 7 / 3 # Returns 2.3333...
```
- `//` is the floor division operator, which returns the largest integer less than or equal to the result.
```python
result = 7 // 3 # Returns 2
```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I convert time to seconds in python?

534


Is fortran faster than python?

561


What is split used for?

552


What is enumerate() function in python?

515


What is setup script?

556






Why cannot lambda forms in Python contain statements?

677


How to get all keys from dictionary ?

614


Can python be used for web client and web server side programming? And which one is best suited to python?

542


What is python private heap space?

642


What is __ new __ in python?

557


How to make any variable private in python ?

558


How do you perform pattern matching in python? Explain?

549


Does python sleep use cpu?

595


What happens in the background when you run a python file?

731


What does len () do in python?

595