helloworld'helloljust( 'hello 'hellorjust( says that we want to right-justify 'helloin string of total length 'hellois five charactersso five spaces will be added to its leftgiving us string of characters with 'hellojustified right an optional second argument to rjust(and ljust(will specify fill character other than space character enter the following into the interactive shell'hellorjust( '*''***************hello'helloljust( '-''hellothe center(string method works like ljust(and rjust(but centers the text rather than justifying it to the left or right enter the following into the interactive shell'hellocenter( hello 'hellocenter( '=''=======hello========these methods are especially useful when you need to print tabular data that has correct spacing open new file editor window and enter the following codesaving it as picnictable pydef printpicnic(itemsdictleftwidthrightwidth)print('picnic itemscenter(leftwidth rightwidth'-')for kv in itemsdict items()print( ljust(leftwidth'str(vrjust(rightwidth)picnicitems {'sandwiches' 'apples' 'cups' 'cookies' printpicnic(picnicitems printpicnic(picnicitems you can view the execution of this program at /picnictablein this programwe define printpicnic(method that will take in dictionary of information and use center()ljust()and rjust(to display that information in neatly aligned table-like format the dictionary that we'll pass to printpicnic(is picnicitems in picnicitemswe have sandwiches apples cupsand , cookies we want to organize this information into two columnswith the name of the item on the left and the quantity on the right to do thiswe decide how wide we want the left and right columns to be along with our dictionarywe'll pass these values to printpicnic(manipulating strings