I have a function that produces an array that looks like this:
[(1, 3, 'test data')]
Any data in that array can change so I can't just do
print(x[1:])
I need to print all of the strings in the array. Any ideas are appreciated. Thanks!
I need to print anything in the apostrophes
In other words, you want to print strings:
for some_tuple in the_list: for element in some_tuple: # check if element is a string if isinstance(element, str): print(element)
548k questions
547k answers
4 comments
86.3k users