+ 2

[Solved] Can anyone tell me how many argument here??

Like print(x , "num is", y) have 3 function arguments and print(x , "num is %d" %y) have???

25th Jan 2020, 1:40 AM
Shivam Maurya
Shivam Maurya - avatar
1 ответ
+ 1
Shivam Maurya, why does your question still have [unsolved] in front of it? Didn't you understand Da Funkjoker's answer? % is an operator. It creates a new string out of the left string and the right value to be entered. So '%d' % 5 is evaluated to '5' and therefore becomes one argument.
25th Jan 2020, 11:52 AM
HonFu
HonFu - avatar