Thanks for your help Francesco. This works.
Sree.
--- On Fri, 3/11/11, Francesco Loffredo wrote:
> From: Francesco Loffredo
> Subject: Re: [Tutor] Need help with dates in Python
> To: tutor@python.org
> Date: Friday, March 11, 2011, 1:05 AM
> On 09/03/2011 9.21, nookasree
&
3/10/11, James Reynolds wrote:
From: James Reynolds
Subject: Re: [Tutor] Need help with dates in Python
To: "nookasree ponamala"
Cc: "Andre Engels" , tutor@python.org
Date: Thursday, March 10, 2011, 2:26 AM
On Wed, Mar 9, 2011 at 1:34 PM, nookasree ponamala wrote:
Hi,
On 09/03/2011 9.21, nookasree ponamala wrote:
Hi,
I need help in finding the minimum date and maximum date in a file.
Here is my test file:
s.no: dt1 amt id1 id2
452 2010-02-20 $23.26 05954206107
452 2010-02-05 $20.78 05954206107
451
Street | Houston, TX 77002
work phone: 713 - 216 - 5423
From: tutor-bounces+ramit.prasad=jpmchase@python.org
[mailto:tutor-bounces+ramit.prasad=jpmchase@python.org] On Behalf Of James
Reynolds
Sent: Wednesday, March 09, 2011 2:57 PM
To: nookasree ponamala
Cc: tutor@python.org
Subject: Re: [Tuto
d(t)
> print t
>
> Thanks
> Sree.
>
> --- On Wed, 3/9/11, Andre Engels wrote:
>
> > From: Andre Engels
> > Subject: Re: [Tutor] Need help with dates in Python
> > To: "nookasree ponamala"
> > Cc: tutor@python.org
> > Date:
nookasree ponamala wrote:
Hi,
I'm new to Python programming. I've changed the code to below, but still it is
not working, Could you pls. make the corrections in my code.
If you are to be a programmer, you need to learn how to read the error
messages you get. You probably would have seen an er
I'm new to the language as well, but I think you're missing your
indentation after each of your 'if' conditions?
On 03/09/2011 10:34 AM, nookasree ponamala wrote:
if t< max:
maxyr = max< should be indented
if t> min:
maxyr = max
if t > min:
minyr = min
t = (a,b,maxyr,minyr)
tot.append(t)
print t
Thanks
Sree.
--- On Wed, 3/9/11, Andre Engels wrote:
> From: Andre Engels
> Subject: Re: [Tutor] Need help with dates in Python
>
On Wed, Mar 9, 2011 at 9:21 AM, nookasree ponamala wrote:
> Hi,
>
> I need help in finding the minimum date and maximum date in a file.
> Here is my test file:
> s.no: dt1 amt id1 id2
> 452 2010-02-20 $23.26 059542 06107
> 452 2010-02-05 $20.78 0595
import datetime
min = datetime.date(2008, 1, 1)
max = datetime.date(2012, 12, 31)
file = open ('test2.txt','r')
line = file.readline()[-1]
while line:
# your code
2011/3/9 nookasree ponamala
> Hi,
>
> I need help in finding the minimum date and maximum date in a file.
> Here is my test fil
Hi,
I need help in finding the minimum date and maximum date in a file.
Here is my test file:
s.no: dt1 amt id1 id2
452 2010-02-20 $23.26 05954206107
452 2010-02-05 $20.78 05954206107
451 2010-02-24 $5.99 05954220151
11 matches
Mail list logo