Is there an easy way (hopefully one liner) to replace “something like” - “?Thanks a lot.
tup = (1,2,'ABC','','','','text')
What about the next one?
tuple('-' if x == '' else x for x in tup)
Like Felix Kling comments, tuples are immutable , so the best thing you can do is to bring back a new one.