Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #79846

Re: Anyone know the solution

Newsgroups comp.lang.python
Date 2014-10-28 09:07 -0700
References <43dce2d9-38ef-462c-bb52-897d827e50c5@googlegroups.com>
Message-ID <f9c39375-d0ff-4f16-aa05-6d8c8fdf7267@googlegroups.com> (permalink)
Subject Re: Anyone know the solution
From ngangsia akumbo <ngangsia@gmail.com>

Show all headers | View raw


This is a sample code on how to read data from a file

files1 {}

result = open("file1.txt")
for line in result:
    file1 = line>split()
files1.append(file1)
result.close()
file1.sort()
file1.reverse()

print('THE FILE INFO')

print(file1(0)
print(file1(1)
        

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Anyone know the solution emmanueloje@gmail.com - 2014-10-27 08:10 -0700
  Re: Anyone know the solution alister <alister.nospam.ware@ntlworld.com> - 2014-10-27 15:21 +0000
  Re: Anyone know the solution Joel Goldstick <joel.goldstick@gmail.com> - 2014-10-27 11:20 -0400
  Re: Anyone know the solution Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-10-27 20:18 -0400
  Re: Anyone know the solution Denis McMahon <denismfmcmahon@gmail.com> - 2014-10-28 00:20 +0000
  Re: Anyone know the solution alex23 <wuwei23@gmail.com> - 2014-10-28 10:33 +1000
    Re: Anyone know the solution Anton <anton.schattenfeld@gmail.com> - 2014-10-28 18:28 -0700
      Re: Anyone know the solution alex23 <wuwei23@gmail.com> - 2014-10-29 12:03 +1000
      Re: Anyone know the solution Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-10-29 18:13 +1300
        Re: Anyone know the solution Anton <anton.schattenfeld@gmail.com> - 2014-10-29 17:09 -0700
  Re: Anyone know the solution Terry Reedy <tjreedy@udel.edu> - 2014-10-28 00:24 -0400
    Re: Anyone know the solution "Mario R. Osorio" <nimbiotics@gmail.com> - 2014-10-28 08:38 -0700
  Re: Anyone know the solution ngangsia akumbo <ngangsia@gmail.com> - 2014-10-28 09:07 -0700
    Re: Anyone know the solution Cameron Simpson <cs@zip.com.au> - 2014-10-29 11:53 +1100
    Re: Anyone know the solution Dave Angel <davea@davea.name> - 2014-10-28 22:11 -0400
  Re: Anyone know the solution Denis McMahon <denismfmcmahon@gmail.com> - 2014-10-29 18:03 +0000

csiph-web