I have Googled a lot, but couldn't find a proper solution for this. I have an output file that I get when I run my code. It works fine, but I want to print
some stuff in a different way (for example: in the middle, of slightly more to the right and so on), so I need to put some width on it.
I've noticed I can use "\t"
this, but this is equal to 8 tabs and I can't seem to change it with expandtabs()
. My question is: what is the simplest and best way to do this? I am used to CSS and HTML, so I am expecting some width function or something, but I can't find one.
I am just printing an ordinary string.
What I have:
"Blabla blabla" #string
"I don't want this text here" #string
What I want:
"Blabla blabla" #string
"I want this text here for example" #string