String formatting: Fifteen and five characters allowed in string : Output Format « Development « Python
- Python
- Development
- Output Format
String formatting: Fifteen and five characters allowed in string

stringValue = "String formatting"
print "Fifteen and five characters allowed in string:"
print "(%.15s) (%.5s)" % ( stringValue, stringValue )
Related examples in the same category