Answers for "python read file with class"

0

python read file with class

class Main(object):
    def __init__(self, thing1, thing2):
        self.thing1 = thing1
        self.thing2 = thing2
with open('Your file') as f:
    data = [i.strip().split() for i in f.readlines()]
Posted by: Guest on April-22-2022

Python Answers by Framework

Browse Popular Code Answers by Language