So according to the Zen of Python ... Explicit is better than implicit...Sparse is better than dense...Readability counts...but then agai
With a string, as you have, I would go with the first option, since it makes it clear that the result you want is a string. For a list or other iterable/slicable, I'd go with the second.
An added benefit of the first form is it will work if val
is not actually a string, but some other iterable of characters (e.g. a generator of some kind). In some cases, this makes a big difference.