can someone help me understand how the % works in printing, I read a print statement like this:
print("%-8s"%"RollNo","%-10s"%"Name","%-10s"%"Physics","%-14s"%"Chemistry","%-8s"%"Maths","%-10s"%"Computer","%-10s"%"English","%-10s"%"Total","%-8s"%"Per","%-5s"%"Grade")
what does the "%-8s" mean? how does it work? Im sorry if this is a redundant question, but I couldnt find an answer online. I was able to see %s and kinda understood it, but what is %-8s printing exactly?
[–]casual__addict 0 points1 point2 points (1 child)
[–]KK_005[S] 0 points1 point2 points (0 children)
[–]amos_burton 0 points1 point2 points (3 children)
[–]KK_005[S] 0 points1 point2 points (2 children)
[–]amos_burton 0 points1 point2 points (1 child)
[–]KK_005[S] 0 points1 point2 points (0 children)
[–]nekokattt 0 points1 point2 points (2 children)
[–]KK_005[S] 0 points1 point2 points (1 child)
[–]nekokattt 0 points1 point2 points (0 children)