Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pyperclip as clip
- from random import randint
- def add_zeros(s):
- if len(s) < 1:
- print('')
- return
- result = ''
- for c in list(s):
- count = randint(2,8)
- result += ' ' + ('\u200b' * count)
- clip.copy(result)
- print('Copied to clipboard.\n{} characters added to form {} words.'.format(len(result) - len(s), len(s)))
- if __name__ == '__main__':
- inp = input('Enter a word count or paste spaces: ')
- if inp.isnumeric():
- add_zeros(' ' * int(inp))
- else:
- add_zeros(inp)
Advertisement
Add Comment
Please, Sign In to add comment