• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
10 views

Problem:

Python 3, I want to format a string to print right aligned. I know I can do this:

In Python 3, I want right aligned string , i am using this code to do it:

print('{:>{0}}'.format('string goes here'))

Using above code i am getting this error:

ValueError: cannot switch from automatic field numbering to manual field specification

What is the right code to achieve this and get rid of error:

"cannot switch from automatic field numbering to manual field specification"

by (550 points)  

Your answer

Please note that all answers are moderated and will be deleted if they are:

>Not relavant to the programming or IT related
>Spam
>Advertising campaigns or links to other sites
>Abusive content.

Kindly do not waste your time by posting non relevant content on Kodlogs.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...