Home >Backend Development >Python Tutorial >What does % in python mean?
What does % in python mean?
What does % in python mean:
1. Modulo operation is equivalent to mod, which is to calculate the remainder of division. For example, 5%2 will get 1.
2. % is also used in python’s formatted output, for example:
a = 'test' print 'it is a %s' %(a)
The printed result is
it is a test
Related recommendations: "Python Tutorial 》
The above is the detailed content of What does % in python mean?. For more information, please follow other related articles on the PHP Chinese website!