0

I have a HUGE (like more than 1000 lines) amount of data that needs to be put into a list to be useful for my code. I want to automatize the formation. This is what my data looks like:

4261
6778
1531
2914
2102
4098
2451
1219
6488
3941
2158

and I need it to look somewhat like this:

var = ['4261', '6778', '1531', '2914', '2102', '4098', '2451', '1219', '6488', '3941', '2158']

how is it possible to make it automatically in python?

if isn't possible in python, is there any language that works better for this kind of work?

Oliveira
  • 3
  • 2
  • Or if you really want a list of strings, not a list of numbers: https://stackoverflow.com/questions/3277503/how-to-read-a-file-line-by-line-into-a-list – mkrieger1 Dec 06 '22 at 16:59

0 Answers0