Make same strings

Will it be a bad practice if I make the two strings equal by adding “.0” in end of min length string like:

Input: 1.0.1.6 and 1

Make it to:
1.0.1.6 and 1.0.0.0

appending to a string is not really a bad coding practice, but if you need the original string later it would be better to just make a copy of it and append in the copy.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.