Is there a custom way of padding lines of text in python, I am using the escape characters "\t", but I wonder if there is an alternative. for example
print('My Name is:')
print('Rambo')
print('Mambo')
Output:
.My Name is:
.....Rambo
..Mambo
Is there a custom way of padding lines of text in python, I am using the escape characters "\t", but I wonder if there is an alternative. for example
print('My Name is:')
print('Rambo')
print('Mambo')
Output:
.My Name is:
.....Rambo
..Mambo
Write a simple function for yourself.
def p(a,b):
print(" "*a + b)
p(1,"while")
This should return:" while"