Is there a way to combine all items in a list into one string?
print(isbnl)# str(isbnl).strip('[]'))
Is there a way to combine all items in a list into one string?
print(isbnl)# str(isbnl).strip('[]'))
You have two options:
If the items in your list are already strings:
list_of_strings = ['abc', 'def', 'ghi'] # give a list of strings
new_string = "".join(list_of_strings) # join them into a new string
If the items in your list are not ALL strings, you can must turn them into strings first:
list_of_nonstrings = [1.83, some_object, 4, 'abc'] # given a list of mixed types
# construct new list of strings for join function
list_of_strings = [str(thing) for thing in list_of_nonstrings]
new_string = "".join(list_0f_strings) # join into new string, just like before
Now you may print or manipulate new_string
however you need to.