I have a text file with multiple lines of numbers, Using the code below produces the result below
Code:
with open('servers.txt') as x:
b = [line.strip() for line in x]
Result:
['867121767826980894', '828966373161828373']
I need to convert this to below so 867121767826980894 is an int and 828966373161828373 also an int separated by comma's
[867121767826980894, 828966373161828373]