String Formatting Operators
The string formatting operator is one of the
most exciting feature of python. The formatting operator % is used to construct
strings, replacing parts of the strings with the data stored in variables.nhy re teolW
(“String to be display with %val1 and %val2” %(val1,
val2))
name = "Rajarajan"
mark = 98
print ("Name: %s and Marks:
%d" %(name,mark))
Name: Rajarajan and Marks: 98
Related Topics
Privacy Policy, Terms and Conditions, DMCA Policy and Compliant
Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.