Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # b_print_each_at_x.py
- def print_each_at_x(vars_list, n=20):
- for var in vars_list:
- print(f"{var:<{n}}", end="")
- print() # to print a new line at the end
- # Example usage:
- var1 = "Hello"
- var2 = "Wonderful World"
- var3 = "!!!"
- vars_list = [var1, var2, var3]
- print_each_at_x(vars_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement