Answers for "what does % do in python"

1

what does % do in python

65 % 2
#This will be 1, since % will calculate the remainder of the variable
# % is the modulus operator
Posted by: Guest on April-23-2021
0

//= python meaning

#Performs floor-division on the values on either side. Then assigns it to the expression on the left.
>>> a=6
>>> a//=3
>>> print(a)
2
Posted by: Guest on April-06-2020

Code answers related to "what does % do in python"

Python Answers by Framework

Browse Popular Code Answers by Language