Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. # Inserts an arbitrary number of spaces. The default is 4.
  2. # Useful for indenting paragraphs in descs, etc.
  3. def space(text, *args, **kwargs):
  4.     try:
  5.         length = abs(int(text)) if text else 4
  6.     except ValueError:
  7.         length = 4
  8.     fill = args[0] if args else ' '
  9.     return fill[0] if len(fill) > 1 else fill * length
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement