How to make a string into a comma-separated list in Python list python code example
Example 1: python list comma separated string
hobbies = ["basketball", "football", "swimming"]
print("My hobbies are:") # My hobbies are:
print(", ".join(hobbies)) # basketball, football, swimming
Example 2: convert list to string separated by comma python
converted_list = [str(element) for element in a_list]