Changes

Jump to: navigation, search

OPS435 Python Lab 4

47 bytes added, 10:44, 23 June 2017
PART 3 - String Formatting Advanced Features
print('{0:>10} {1:>10} {2:>10}\n{3:>10} {4:>10} {5:>10}'.format('abc', 'def', 'ghi', 'jkl123', 'mno123', 'pqr123'))
</source>
:#Finally center , you can centre the alignment with of strings using the '''^''' symbol. Issue the following:<source>
# Without positional argument numbers
print('{:^10} {:^10} {:^10}\n{:^10} {:^10} {:^10}'.format('abc', 'def', 'ghi', 'jkl123', 'mno123', 'pqr123'))
13,420
edits

Navigation menu