运行后一堆空白行
>>> fname=input(‘Enter filename:‘) Enter filename:hongding >>> try: fobj=open(fname,‘r‘) except(IOError,e): print(‘***file open error:‘,e) else: for eachLine in fobj: print(eachLine,)fobj.close() SyntaxError: invalid syntax >>> fname=input(‘Enter filename:‘) Enter filename:hongding >>> try: fobj=open(fname,‘r‘) except(IOError,e): print(‘***file open error:‘,e) else: for eachLine in fobj: print(eachLine,) fobj.close()
时间: 2024-10-15 01:45:33