Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Inserts an arbitrary number of spaces. The default is 4.
- # Useful for indenting paragraphs in descs, etc.
- def space(text, *args, **kwargs):
- try:
- length = abs(int(text)) if text else 4
- except ValueError:
- length = 4
- fill = args[0] if args else ' '
- return fill[0] if len(fill) > 1 else fill * length
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement