I realise that if you have an iterable you should always use .join(iterable)
instead of for x in y: str += x
. But if there\'s only a fixed number of va
I take the question to mean: "Is it ok to do this:"
ret = user + '@' + host
..and the answer is yes. That is perfectly fine.
You should, of course, be aware of the cool formatting stuff you can do in Python, and you should be aware that for long lists, "join" is the way to go, but for a simple situation like this, what you have is exactly right. It's simple and clear, and performance will not be an issue.