python-minifier prefers single over double quotes:
Input: print("") (9 bytes)
Output: print('') (9 bytes)
However, it switches to double quotes if there are single quotes in the string:
Input: print('\'') (11 bytes)
Output: print("'") (10 bytes)
When there are both single and double quotes in the string, it will go back to preferring single quotes:
Input: print("'\"") (12 bytes)
Output: print('\'"') (12 bytes)
However, it will still prefer single quotes even if there are more single than double quotes, so it’s possible for the output to be larger than the input:
Input: print("'\"'") (13 bytes)
Output: print('\'"\'') (14 bytes)
python-minifier prefers single over double quotes:
However, it switches to double quotes if there are single quotes in the string:
When there are both single and double quotes in the string, it will go back to preferring single quotes:
However, it will still prefer single quotes even if there are more single than double quotes, so it’s possible for the output to be larger than the input: