PYTHON   20
my py
Guest on 1st February 2023 01:17:16 AM


  1. def main(request):
  2.   #Open the file back and read the contents
  3.    f=open("ensnum.20km.201901.0", "r")
  4.    if f.mode == 'r':
  5.        contents =f.read()
  6.        print (contents)
  7.   #or, readlines reads the individual line into a list
  8.    fl =f.readlines()
  9.    for x in fl:
  10.        print (x)
  11.    return render(request,'main.html')

Raw Paste

Login or Register to edit or fork this paste. It's free.