I have converted items in a list to a string using the following:
target_ls = [w, x, y, z]
as_str = (str (y) for y in target_ls)
final_str = "\t".join(as_str) + "\n"
But I notice that I can also use:
as_str = [str (y) for y in target_ls]
final_str = "\t".join(as_str) + "\n"
The result for both is the same. Does using square brackets instead of parentheses (or vice-versa) matter in this case?
Thank you