openfile (Read)
# read file of text import os handle = open(filename,'r+t') # r=read t=textdatei line = handle.readline().strip() # löscht zahl = float(line) handle.close() # read all lines import os handle = open(filename,'r+t') # r=read t=textdatei lines = handle.readlines() handle.close() for line in lines: l=line.strip()