Question: Using visual studio python. How do I make the numbers from a data.txt file (numbers are in a single column, seperated into 100 lines) into
Using visual studio python. How do I make the numbers from a data.txt file (numbers are in a single column, seperated into 100 lines) into a single string seperated into a comma?
I'm doing:
from_data = open("data.txt", 'r')
string = ', '.join(from_data)
print(string)
from_data.close()
but they are not in a single line and are seperated into new lines
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
