Python string formatter for paragraphs
问题 I'm trying to format some strings for output on the command-line, report style, and am looking for the easiest method to format a string such that I can get automatic paragraph formatting. In perlform formatting is done through the "format" function format Something = Test: @<<<<<<<< @||||| @>>>>> $str, $%, '$' . int($num) . $str = "widget"; $num = $cost/$quantity; $~ = 'Something'; write; Variations of the perlform allow texts to be wrapped cleanly, useful for help screens, log reports and