I have this:
Lt = [('ABC', ), ('Abc', ), ('xyz', ), ('ABC', ), ('Abc', )]
I want this:
Lt = ('Abc', 'Abc', 'xyz', 'ABC', 'ABc')
remove the extra "(",")" and ",".... How do i do this.
I have this:
Lt = [('ABC', ), ('Abc', ), ('xyz', ), ('ABC', ), ('Abc', )]
I want this:
Lt = ('Abc', 'Abc', 'xyz', 'ABC', 'ABc')
remove the extra "(",")" and ",".... How do i do this.
Is that a list of strings or tuples? Assuming they're tuples:
[t[0] for t in [('ABC', ), ('Abc', ), ('xyz', ), ('ABC', ), ('Abc', )]]
another way
a = tuple([''.join(x) for x in Lt])
>>> a
('ABC', 'Abc', 'xyz', 'ABC', 'Abc')