+ 2

what is the main use of "%"?

23rd Aug 2016, 12:21 PM
Gaurav Sahadev
Gaurav Sahadev - avatar
2 Answers
+ 1
its the modulus operator, the other use is for string formatting like print('%s %s' % ('hello', 'world'))
25th Nov 2016, 4:09 PM
skycc
skycc - avatar
0
% is to get remainder of 2 numbers e.g: 5℅3=2
23rd Aug 2016, 3:03 PM
Dibyendu Das
Dibyendu Das - avatar