On Mon, Oct 13, 2014 at 03:54:59PM +0800, Crusier wrote:
> Hi Alan,
>
> Attached are the two text files (stocklist.txt & stocklist1.txt) which I
> want to do a comparison with the content of the file, Basically, I want to
> see if there are any new numbers added to the file.
>
> Please comment on
Crusier Wrote in message:
>
Attached are the two text files (stocklist.txt & stocklist1.txt) which I want
to do a comparison with the content of the file, Basically, I want to see if
there are any new numbers added to the file.
> Please comment on the sequence of the file:
1. First, Open
Hi Alan,
Attached are the two text files (stocklist.txt & stocklist1.txt) which I
want to do a comparison with the content of the file, Basically, I want to
see if there are any new numbers added to the file.
Please comment on the sequence of the file:
1. First, Open up the File No. 1 and put the
On 14/10/13 15:41, Sammy Cornet wrote:
. In which I´m want to get the user to prompt for the values of a and b.
So where is the code where you prompt the user and read input.
All we can see is a single function?
For some reason I can´t run it. The follwing is what I have written on
my scr
Hello!I´m using Idle (Python 2.7,5 version). I´m trying to write a program of
compare function that returns 1 if a > b , 0 if a == b , and -1
if a < b . In which I´m want to get the user to prompt for the values of a and
b. For some reason I can´t run it. The follwing is what I have written on
On Wed, Jul 13, 2011 at 11:02 AM, Peter Otten <__pete...@web.de> wrote:
> Edgar Almonte wrote:
>
>> fist time i saw the statement "with" , is part of the module csv ? ,
>> that make a loop through the file ? is not the sortkey function
>> waiting for a paramenter ( the row ) ? i don't see how is ge
Edgar Almonte wrote:
> fist time i saw the statement "with" , is part of the module csv ? ,
> that make a loop through the file ? is not the sortkey function
> waiting for a paramenter ( the row ) ? i don't see how is get pass ,
> the "key" is a parameter of sorted function ? , reader is a functio
On Tue, Jul 12, 2011 at 10:32 PM, Emile van Sebille wrote:
> On 7/12/2011 4:01 PM Edgar Almonte said...
>>
>> On Tue, Jul 12, 2011 at 5:44 AM, Peter Otten<__pete...@web.de> wrote:
>
>
>>>
>>> import csv
>
> imports the comma separated values (csv) file handler utilities module
>
>>>
>>> def sort
On 7/12/2011 4:01 PM Edgar Almonte said...
On Tue, Jul 12, 2011 at 5:44 AM, Peter Otten<__pete...@web.de> wrote:
import csv
imports the comma separated values (csv) file handler utilities module
def sortkey(row):
if float(row[1]):
return row[1], True
else:
return
On Tue, Jul 12, 2011 at 5:44 AM, Peter Otten <__pete...@web.de> wrote:
> Edgar Almonte wrote:
>
>> thanks emile i understand exactly what you explain me but i was unable
>> to accomplish it ( too noob in python ) but i solved the problem with
>> this code
>> http://pastebin.com/4A6Jz4wZ
>>
>> i wil
On 07/12/2011 08:25 AM, Edgar Almonte wrote:
On Tue, Jul 12, 2011 at 7:28 AM, Dave Angel wrote:
On 07/12/2011 12:56 AM, Edgar Almonte wrote:
thanks emile i understand exactly what you explain me but i was unable
to accomplish it ( too noob in python ) but i solved the problem with
this code
h
On Tue, Jul 12, 2011 at 7:28 AM, Dave Angel wrote:
> On 07/12/2011 12:56 AM, Edgar Almonte wrote:
>>
>> thanks emile i understand exactly what you explain me but i was unable
>> to accomplish it ( too noob in python ) but i solved the problem with
>> this code
>> http://pastebin.com/4A6Jz4wZ
>>
>
On Tue, Jul 12, 2011 at 5:44 AM, Peter Otten <__pete...@web.de> wrote:
> Edgar Almonte wrote:
>
>> thanks emile i understand exactly what you explain me but i was unable
>> to accomplish it ( too noob in python ) but i solved the problem with
>> this code
>> http://pastebin.com/4A6Jz4wZ
>>
>> i wil
On 07/12/2011 12:56 AM, Edgar Almonte wrote:
thanks emile i understand exactly what you explain me but i was unable
to accomplish it ( too noob in python ) but i solved the problem with
this code
http://pastebin.com/4A6Jz4wZ
(When you post on this list, your comments should follow the pieces
yo
Edgar Almonte wrote:
> thanks emile i understand exactly what you explain me but i was unable
> to accomplish it ( too noob in python ) but i solved the problem with
> this code
> http://pastebin.com/4A6Jz4wZ
>
> i will try do what you suggest me anyway but that will tomorrow ,
> tonight i done a
thanks emile i understand exactly what you explain me but i was unable
to accomplish it ( too noob in python ) but i solved the problem with
this code
http://pastebin.com/4A6Jz4wZ
i will try do what you suggest me anyway but that will tomorrow ,
tonight i done and i feel good :D
Thanks all for th
On 7/11/2011 5:02 PM Edgar Almonte said...
back again,
yes that is the idea:
"> If I venture a guess, it seems to me that you want the debits and
corresponding offsetting credits listed in sequence."
but not sure if i get you pseudo code , you mean
some how flag the line when is D or C ( cre
i not too smart steve , can you show me with code ?
On Mon, Jul 11, 2011 at 8:22 PM, Steve Willoughby wrote:
> On 11-Jul-11 17:18, Edgar Almonte wrote:
>>
>> this is just one time thing and the value don't get repeat
>
> Then you could make a single loop over the input lines, building two
> dicti
On 11-Jul-11 17:18, Edgar Almonte wrote:
this is just one time thing and the value don't get repeat
Then you could make a single loop over the input lines, building two
dictionaries as you go:
* one that maps column 2's value to the rest of that line's data
* and one that does this for colu
this is just one time thing and the value don't get repeat
On Mon, Jul 11, 2011 at 7:55 PM, Steve Willoughby wrote:
> On 11-Jul-11 16:50, Edgar Almonte wrote:
>>
>> Thanks for the hints , what i want accomplish is sort the line by the
>> same value in the column 2 and 3
>>
>> i mean the line with
On 11-Jul-11 16:50, Edgar Almonte wrote:
Thanks for the hints , what i want accomplish is sort the line by the
same value in the column 2 and 3
i mean the line with the same value in the 2 get together with the
line in the same value in column 3
What if the same value appears more than once?
back again david
i do the for because the line is delimited by pipeline so and i need
get the field number 2 and 3 of the line
if i understand well the split('|')[z] will just split till there ( z
value ) so if i do split('|')[2] i will get:
X , 0.00 and i just want the num
back again,
yes that is the idea:
"> If I venture a guess, it seems to me that you want the debits and
> corresponding offsetting credits listed in sequence."
but not sure if i get you pseudo code , you mean
some how flag the line when is D or C ( credit of debit )
and then sort by what ?
On Mon
Thanks for the hints , what i want accomplish is sort the line by the
same value in the column 2 and 3
i mean the line with the same value in the 2 get together with the
line in the same value in column 3
emile and david thanks again let me check the hint that your give me,
i will feedback the co
On 07/11/2011 06:39 PM, Emile van Sebille wrote:
On 7/11/2011 3:16 PM Edgar Almonte said...
hello , i have a file this a structure like this
X | 0.00| 88115.39|
X | 90453.29| 0.00|
X | 0.00| 90443.29|
On 7/11/2011 3:16 PM Edgar Almonte said...
hello , i have a file this a structure like this
X | 0.00| 88115.39|
X | 90453.29| 0.00|
X | 0.00| 90443.29|
X | 88115.39| 0.0
hello , i have a file this a structure like this
X | 0.00| 88115.39|
X | 90453.29| 0.00|
X | 0.00| 90443.29|
X | 88115.39| 0.00|
X | 0.00|
Jojo Mwebaze wrote:
Hello Tutor
I would like to compare two souce code files but ignoring doc strings,
comments and space (and perharps in future statement by statement
comparision)
e.g
class Foo
def foo():
# prints my name
return 'my name'
class Boo
def boo():
print 'my
Hello Tutor
I would like to compare two souce code files but ignoring doc strings,
comments and space (and perharps in future statement by statement
comparision)
e.g
class Foo
def foo():
# prints my name
return 'my name'
class Boo
def boo():
print 'my name'
Want to check i
ski wrote:
hello,
i have created this function that compares the values of a csv file
against a dictionary, you can see the code, here
http://paste.lisp.org/display/76705
the affiliations list has 130 items.
is there a better way to build the 'items' list?
Please define "better".
If you m
hello,
i have created this function that compares the values of a csv file
against a dictionary, you can see the code, here
http://paste.lisp.org/display/76705
the affiliations list has 130 items.
is there a better way to build the 'items' list?
thanks
norman
___
> >
> >1 # calc.py
> >2 def calc(seq):
> >3 maximum = 0
> >4 max_item = []
> >5 for i in seq:
> >6 product = (i[0]*100 + i[1]*10 + i[2]) * (i[3]*10 + i[4])
> >7 if product > maximum:
> >8maximum = product
> >9max_item = i
> > 10 el
In your code that line is not executed. And if it was at some stage, it
will give you an error.
max_item is a list and you cannot put a string and a list together:
"TypeError: cannot concatenate 'str' and 'list' objects".
What are trying to do with this line? 'maximum = 0' and so product will
What does this line 11 mean in the following code?
1 # calc.py
2 def calc(seq):
3 maximum = 0
4 max_item = []
5 for i in seq:
6 product = (i[0]*100 + i[1]*10 + i[2]) * (i[3]*10 + i[4])
7 if product > maximum:
8maximum = product
9max_ite
Hey everyone
I have a question. I need to compare two dates and times but it has to be
quick. (With quick I mean that the algorythm has to be simple in efficient
Here is the deal:
day="thursday"
hour1="15:30"
hour2="16:30"
all of the above are strings
I have to get the system date and time an
At 03:01 PM 5/12/2005, Alberto Troiano wrote:
Hey everyone
I have a question. I need to compare two dates and times but it has to be
quick. (With quick I mean that the algorythm has to be simple in
efficient
Here is the deal:
day="thursday"
hour1="15:30"
hour2="16:30"
all of the above are string
36 matches
Mail list logo