HackerRank Text Alignment problem solution in Python | python problem solution
In Python, a string of text can be aligned left, right and center..ljust(width)This method returns a left aligned string of length width.>>> width = 20>>> print 'HackerRank'.ljust(width,'-')HackerRank---------- .center(width)This method returns a centered string of…