Sep-16-2019, 11:29 PM
I am trying to use the rjust method to align part of a string in the following text:
for key in breakfast:
print('%s \t %d calories'%(key,breakfast[key]))
I want to rjust the %d calories part of the string. Not the entire string. Is there a way to do this?
for key in breakfast:
print('%s \t %d calories'%(key,breakfast[key]))
I want to rjust the %d calories part of the string. Not the entire string. Is there a way to do this?