I'm from mechanical background. Just explain me use of % sign in following code. This is a program to display exam schedule. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I'm from mechanical background. Just explain me use of % sign in following code. This is a program to display exam schedule.

exam_st_date = (11,12,2014) print( "The examination will start from : %i / %i / %i"%exam_st_date)

19th Sep 2020, 5:52 AM
jayesh patil
jayesh patil - avatar
1 Answer
+ 2
%d and %I are used as a placeholder for numeric or decimal values. see the Python String Formatting Manual: http://docs.python.org/2/library/stdtypes.html#string-formatting
19th Sep 2020, 6:12 AM
pedram ch
pedram ch - avatar