Generation

generate functionThu, 11 May 2023

read a txt file into a list ,igno ENTER

def readlist(file_name): with open(file_name,'r') as f: lst = [i.strip().split(',') for i in f.readlines()] return lst readlist('f.txt')

Want to kickstart your project?Use the new AI Studio to create your code