On 02Aug2019 11:26, bob gailer wrote:
And now for something completely different...
Decorators are not required to return a function!
I use them to create a dictionary that maps function names to the
corresponding function object.
That is an interesting idea! But I want to counter it, briefly
And now for something completely different...
Decorators are not required to return a function!
I use them to create a dictionary that maps function names to the
corresponding function object.
This is very useful when associating actions with user-entered commands.
Example:
def collect(fun
On 7/31/19 11:57 AM, Gursimran Maken wrote:
> Hi,
>
> Anyone could please let me know the difference between decorators and
> inheritance in python.
>
> Both are required to add additional functionality to a method then why are
> we having 2 separate things in python for doing same kind of work.
On 31/07/2019 18:57, Gursimran Maken wrote:
> Anyone could please let me know the difference between decorators and
> inheritance in python.
>
> Both are required to add additional functionality to a method then why are
> we having 2 separate things in python for doing same kind of work.
Inherit
Hi,
Anyone could please let me know the difference between decorators and
inheritance in python.
Both are required to add additional functionality to a method then why are
we having 2 separate things in python for doing same kind of work.
Thank you,
Gursimran
Thanks Edmondo, Stephen, Mats and Steven you for the tips,
I studied linear algebra many years ago and I remember only a few rudiments.
But I was trying to visualize (in a geometric way) how the numpy
represents arrays, and what the geometrical meaning of the transpose
operation made by numpy.
On Thu, Jun 20, 2019 at 08:39:35PM -0300, Markos wrote:
> Hi,
>
> I'm studying Numpy and I don't understand the difference between
>
> >>>vector_1 = np.array( [ 1,0,1 ] )
>
> with 1 bracket and
>
> >>>vector_2 = np.array( [ [ 1,0,1 ] ] )
>
> with 2 brackets
I'm not really sure what you don't
On 6/20/19 5:39 PM, Markos wrote:
> Hi,
>
> I'm studying Numpy and I don't understand the difference between
>
vector_1 = np.array( [ 1,0,1 ] )
>
> with 1 bracket and
>
vector_2 = np.array( [ [ 1,0,1 ] ] )
>
> with 2 brackets
the first is one-dimensional, the second two-dimensional.
Hi,
I'm studying Numpy and I don't understand the difference between
vector_1 = np.array( [ 1,0,1 ] )
with 1 bracket and
vector_2 = np.array( [ [ 1,0,1 ] ] )
with 2 brackets
The shape of vector_1 is:
vector_1.shape
(3,)
But the shape of vector_2 is:
vector_2.shape
(1, 3)
The tran
On Tue, Aug 8, 2017 at 2:39 AM, Alan Gauld via Tutor wrote:
> On 08/08/17 02:22, boB Stepp wrote:
[snip lots of good stuff]
I am coming to the conclusion I need to code a substantial,
challenging project using OOP techniques, instead of just the toy
programs I have been playing around with so fa
On 08Aug2017 08:39, Alan Gauld wrote:
(1) There are very, very few good uses for static methods in Python. If
you think you need a static method, you probably could just use a
regular module-level function.
Amen to that, I try to avoid staticmethods... and so far
have never found a valid use f
Alan Gauld via Tutor wrote:
> classes are objects too...
Also, classes are instances. Given
>>> class Foo:
... pass
...
>>> foo = Foo()
>>> type(foo)
>>> type(Foo)
what is the type of the type of the type ... of foo?
The answer is a circular definition that you cannot spell in Python its
On 08/08/17 02:22, boB Stepp wrote:
> "@staticmethod" then there are two ways of calling the method, using
> objects or using the class. Is there some reason not to use the
> "ClassName.a_static_method()" syntax? Are there intended uses for
> doing this?
classes are objects too...
You could ha
On 07Aug2017 20:22, boB Stepp wrote:
On Mon, Aug 7, 2017 at 8:36 AM, Steven D'Aprano wrote:
[...]
It is hard to see the distinction between an ordinary method and a
static method from this example. What you are seeing is, by accident,
the equivalent of just writing:
def my_method():
prin
I feel like I have gazed into a crystal clear pool, apparently
shallow, with many interesting objects (Pun intended!) on the pool
floor. Interested in these beautiful things, I jump in to grab one
for close-up study only to find that the pool is much, ... , much
deeper (> 1 boB-height) than it app
On Sun, Aug 06, 2017 at 06:35:10PM -0500, boB Stepp wrote:
> py3: class MyClass:
> ... def my_method():
> ... print('This is my_method in MyClass!')
> ...
> py3: class MyOtherClass:
> ... @staticmethod
> ... def my_other_method():
> ... print('This is my_other_m
On Sun, Aug 6, 2017 at 11:35 PM, boB Stepp wrote:
>
> I see no difference in result, whether I use the @staticmethod decorator or
> not.
While a staticmethod and a function are both descriptors [1], a
staticmethod is basically a no-op descriptor. Its __get__ method
always returns its unbound cal
On 07/08/17 00:35, boB Stepp wrote:
> =
> Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64
> bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> p
I am looking more deeply into the subject of decorators for a bit (So
I can thoroughly digest Steve's information in the thread "basic
decorator question".) and have been first looking at static and class
methods. As a start, I have tried the following:
===
On 26Apr2017 22:51, Tim Peters wrote:
[boB Stepp , on %i/%d and %f/%F]
Hmm. I'm surprised this slight distinction was worth keeping two
format codes that otherwise do the same thing. Is there an actual
need for these due to Python being implemented behind the scenes in C?
The implementation
F means print it in uppercase. That's really an edge case for a float, that
would only apply to the special values infinity and not-a-number.
On April 26, 2017 8:08:16 PM MDT, boB Stepp wrote:
>My Google-fu must be weak tonight. I cannot find any discernible
>difference between '%f' % and '%F'
[boB Stepp , on %i/%d and %f/%F]
> Hmm. I'm surprised this slight distinction was worth keeping two
> format codes that otherwise do the same thing. Is there an actual
> need for these due to Python being implemented behind the scenes in C?
The implementation is irrelevant to this. What is rele
On Thu, Apr 27, 2017 at 2:19 AM, Tim Peters wrote:
> [boB Stepp ]
>
>> I cannot find any discernible
>> difference between '%f' % and '%F' %
>> . Is there any or do they duplicate
>> functionality? If the latter, why are there two ways of doing the
>> same thing?
>
> They differ only in the ca
On Wed, Apr 26, 2017 at 9:19 PM, Tim Peters wrote:
> [boB Stepp ]
>> My Google-fu must be weak tonight.
>
> Look here:
>
> https://en.wikipedia.org/wiki/Printf_format_string
Thanks. From the %d versus %i links I found, I should have pursued
the C history more diligently for the %f versus %F
[boB Stepp ]
> My Google-fu must be weak tonight.
Look here:
https://en.wikipedia.org/wiki/Printf_format_string
> I cannot find any discernible
> difference between '%f' % and '%F' %
> . Is there any or do they duplicate
> functionality? If the latter, why are there two ways of doing the
My Google-fu must be weak tonight. I cannot find any discernible
difference between '%f' % and '%F' %
. Is there any or do they duplicate
functionality? If the latter, why are there two ways of doing the
same thing?
I had a similar question for %d and %i, but googling suggests these
are inheri
On 02/01/16 14:33, Ratheesh kumar wrote:
> But I can't get to understand what round() did int() cant't do
With this kind of question its best to ask the interpreter:
>>> int(12.1)
12
>>> int(12.9)
12
>>> round(12.1)
12
>>> round(12.9)
13
>>>
Does that make it clearer?
--
Alan G
Author of the
Hii everyone, Today i was just solving a problem in hacker-rank. A simple one
to calculate the tip and tax for the meal. The resultant answer should be
rounded off. I first wrote the code as below:
m=float(input())
x=int(input())
t=int(input())
tip=(m*x)/100
tax=(m*t)/100
total=m+tip+tax
print("T
On 4/10/2014 5:48 PM, Jared Nielsen wrote:
Thanks for the thorough answer, Bob. I now understand the difference.
Thanks for the ACK. It helps me remember I have something to contribute.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
Thanks for the thorough answer, Bob. I now understand the difference.
On Apr 10, 2014 2:11 PM, "bob gailer" wrote:
> Caveat: I began this before there were any other responses. So this may be
> overkill - but I ike to be thorough.
>
> On 4/9/2014 12:49 PM, Jared Nielsen wrote:
>
>> Hi Pythons,
>>
Caveat: I began this before there were any other responses. So this may
be overkill - but I ike to be thorough.
On 4/9/2014 12:49 PM, Jared Nielsen wrote:
Hi Pythons,
Could someone explain the difference between expressions and statements?
I know that expressions are statements that produce a
Jared Nielsen Wrote in message:
> Hi Pythons,
> Could someone explain the difference between expressions and statements?
> I know that expressions are statements that produce a value.
> I'm unclear on functions and especially strings.
> Are any of the following expressions?
>
> print(42)
> print(
Jared Nielsen writes:
> Could someone explain the difference between expressions and
> statements?
For general programming terminology, the Wikipedia articles tend to be
good.
https://en.wikipedia.org/wiki/Expression_%28computer_science%29>
https://en.wikipedia.org/wiki/Statement_%28computer_sc
On 09/04/14 17:49, Jared Nielsen wrote:
Hi Pythons,
Could someone explain the difference between expressions and statements?
I know that expressions are statements that produce a value.
Yep, that's it.
I'm unclear on functions and especially strings.
Unclear in what way? Both functions and
> Could someone explain the difference between expressions and statements?
>
> I know that expressions are statements that produce a value.
Yes, that's pretty much it. If you can point your finger at the thing
and say that it produces a value, it's an expression.
> Are any of the following expr
Hi Pythons,
Could someone explain the difference between expressions and statements?
I know that expressions are statements that produce a value.
I'm unclear on functions and especially strings.
Are any of the following expressions?
print(42)
print("spam")
spam = 42
print(spam)
Is the first examp
On 07/05/2013 02:37 PM, Amandeep Behl wrote:
and why with sum(one, two) we get an error whereas not with sum((one, two))
?
When replying to a message, your new text should go AFTER the quote.
Putting it first is called top-posting, and it's a Microsoft-introduced
abomination that's not compa
and why with sum(one, two) we get an error whereas not with sum((one, two))
?
On Fri, Jul 5, 2013 at 11:27 AM, Amandeep Behl wrote:
> What is the difference between max(one, two) and max((one, two)) ?
>
> Thanks
> Aman
>
___
Tutor maillist - Tutor@py
What is the difference between max(one, two) and max((one, two)) ?
Thanks
Aman
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On 24/05/13 05:57, Citizen Kant wrote:
I guess I'm understanding that, in Python, if something belongs to a type,
must also be a value.
Everything in Python is a value, and everything belongs to a type. Including other types. Yes,
types are values too, and types have types of their own. There
On 05/23/2013 03:57 PM, Citizen Kant wrote:
It's quite hard to believe that you're not just trolling. Little that
you say below makes any sense with regards to Python.
I guess I'm understanding that, in Python, if something belongs to a type,
must also be a value.
Nothing belongs to a ty
On Thu, May 23, 2013 at 2:57 PM, Citizen Kant wrote:
> I guess I'm understanding that, in Python, if something belongs to a type,
> must also be a value.
>
> I guess I'm understanding that the reason why 9 is considered a value, is
> since it's a normal form, an element of the system that cannot b
wait for someone more knowledgeable to answer, but from what i know,
Yes it does have a profound meaning. Strings consist of character
sets. Something that was here way before Python
Like i said my experience is limited so i too would like to hear some reponses
___
I guess I'm understanding that, in Python, if something belongs to a type,
must also be a value.
I guess I'm understanding that the reason why 9 is considered a value, is
since it's a normal form*,* an element of the system that cannot be
rewritten and reduced any further.
I also guess I'm unders
Alex Hall wrote:
On 10/21/11, Steven D'Aprano wrote:
[...]
The one exception to this is if your class changes the method signature.
E.g. if A.method takes no arguments, but B.method requires an argument.
super cannot help you now. But changing the signature of methods is
almost always the wron
On 10/21/11, Steven D'Aprano wrote:
> Alex Hall wrote:
>> Hi all,
>> I am just curious: I have seen classes that are subclasses initialize
>> their parents through both super and parentClass.__init__. What is the
>> difference, if any, and is one "better" or "more pythonic" than the
>> other?
>
>
Alex Hall wrote:
Hi all,
I am just curious: I have seen classes that are subclasses initialize
their parents through both super and parentClass.__init__. What is the
difference, if any, and is one "better" or "more pythonic" than the
other?
A simple question with a complicated answer...
Firs
Hi all,
I am just curious: I have seen classes that are subclasses initialize
their parents through both super and parentClass.__init__. What is the
difference, if any, and is one "better" or "more pythonic" than the
other?
--
Have a great day,
Alex (msg sent from GMail website)
mehg...@gmail.com
-Original Message-
From: ANKUR AGGARWAL
To: tutor
Sent: Sun, Mar 20, 2011 1:49 pm
Subject: [Tutor] Difference
Hey
want to know whats the difference between the pygame.display.update()
and pygame.display.flip()
An explanation with the example would be grea.
Thanks In Advance
Ankur
Hey
want to know whats the difference between the pygame.display.update() and
pygame.display.flip()
An explanation with the example would be grea.
Thanks In Advance
Ankur Aggarwal
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscripti
On Wed, Mar 25, 2009 at 12:35 AM, Kumar wrote:
> Thanks a lot for the reply Kent .
> Could you please tell me If I will try to move from SmartCookie to
> SimpleCokkie in out application, what precautions should I take care?
Make sure that all the values in the Morsels are strings.
Kent
_
Thanks a lot for the reply Kent .
Could you please tell me If I will try to move from SmartCookie to
SimpleCokkie in out application, what precautions should I take care?
-Thanks
Kumar
On Tue, Mar 24, 2009 at 8:50 PM, Kent Johnson wrote:
> On Tue, Mar 24, 2009 at 10:33 AM, Kumar wrote:
> > I ju
On Tue, Mar 24, 2009 at 10:33 AM, Kumar wrote:
> I just came to know about this classes SimpleCookie and SmartCookie.
> I could get that usage. But I didn't get the difference between these
> classes?
> Can anybody please tell me what is the difference between this classes?
SmartCookie allows coo
Hello,
I am new to python.
I just came to know about this classes SimpleCookie and SmartCookie.
I could get that usage. But I didn't get the difference between these
classes?
Can anybody please tell me what is the difference between this classes?
-Kumar
__
import datetime
s = '09:35:23'
datetime.datetime.strptime(s, '%H:%M:%S')
datetime.datetime(1900, 1, 1, 9, 35, 23)
Can you figure out how to proceed from there?
In case she doesn't know:
import datetime as dt
start="09:35:23"
end="10:23:00"
start_dt = dt.datetime.strptime(start, '%H:%
import datetime
s = '09:35:23'
datetime.datetime.strptime(s, '%H:%M:%S')
datetime.datetime(1900, 1, 1, 9, 35, 23)
Can you figure out how to proceed from there?
In case she doesn't know:
import datetime as dt
start="09:35:23"
end="10:23:00"
start_dt = dt.datetime.strptime(start, '%H:%M:
Use time.strptime() to parse them into seconds since the start of epoch, and
then an ordinary numeric subtraction will work.
Cheers
On Monday 02 March 2009 19:45, Judith Flores wrote:
> Hello,
>
>I can't seem to figure out the syntax to calculate the difference in
> minutes between two time
2009/3/3 Judith Flores :
>
> Hello,
>
> I can't seem to figure out the syntax to calculate the difference in
> minutes between two time stamps. I already read the documentation about
> datetime and time modules, but I was unable to implement the code.
>
> My code will be fed with two timestamps
Hello,
I can't seem to figure out the syntax to calculate the difference in minutes
between two time stamps. I already read the documentation about datetime and
time modules, but I was unable to implement the code.
My code will be fed with two timestamps (as styrings):
start="09:35:23"
end
Varsha Purohit wrote:
> Hello everyone,
>I wanted to know what are the differences between perl and
> python, since both of them are scripting languages...
There is plenty of difference between them and between all the other
scripting languages. Look beyond the notion of "scripting" and
Hello everyone,
I wanted to know what are the differences between perl and
python, since both of them are scripting languages...
thanks
--
Varsha,
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
"Ricardo Aráoz" <[EMAIL PROTECTED]> wrote
>> Thanks guys it was really helpful i m just a beginner in
>> python
>> start to program since two days back. So finding little difficulty
>> with
>> some concepts.
>>
>
> Don't worry, I'm a 20 days "old timer". ;c)
And I've been using Python for
Varsha Purohit wrote:
>
> Thanks guys it was really helpful i m just a beginner in python
> start to program since two days back. So finding little difficulty with
> some concepts.
>
Don't worry, I'm a 20 days "old timer". ;c)
___
Tutor maillist
"Ricardo Aráoz" <[EMAIL PROTECTED]> wrote
>>From Python 2.5 documentation :
>
> index( sub[, start[, end]])
> Like find(), but raise ValueError when the substring is not found.
As opposed to find() which returns -1 when the string is
not found. That means you can use try/except with
index but mu
Thanks guys it was really helpful i m just a beginner in python start
to program since two days back. So finding little difficulty with some
concepts.
On 9/2/07, Ricardo Aráoz <[EMAIL PROTECTED]> wrote:
>
> Varsha Purohit wrote:
> > Hello,
> > i have again very basic question in python stri
Varsha Purohit wrote:
> Hello,
> i have again very basic question in python string management.
>
> I am not able to understand how find and index works and what do they
> actually return.
>
line = "this is varsha"
print line.find("is")
> 2
print line.rfind("is")
> 5
print li
Hello,
i have again very basic question in python string management.
I am not able to understand how find and index works and what do they
actually return.
>>> line = "this is varsha"
>>> print line.find("is")
2
>>> print line.rfind("is")
5
>>> print line.rfind("varsha")
8
>>> print line.index(
"vanam" <[EMAIL PROTECTED]> wrote
> Yes i did a mistake in expressing my problem below are the instances
> of the
> script and its corresponding output,for each instance its giving
> contrasting
> result i want explanation for that
> [1]:def squ(n):
> return n*n
> filter(squ,rang
vanam wrote:
> Yes i did a mistake in expressing my problem below are the instances of
> the script and its corresponding output,for each instance its giving
> contrasting result i want explanation for that
This has pretty much been explained already. Do you have some question
with the explanat
Yes i did a mistake in expressing my problem below are the instances of the
script and its corresponding output,for each instance its giving contrasting
result i want explanation for that
[1]:def squ(n):
return n*n
filter(squ,range(3))>output is not seen on the interpreter
ma
vanam wrote:
> ya i am sure about that i am using python editor which has python
> intrepreter attached to it i got the same output for both filter and map
> def squ(n):
>y = n*n
> print y
> filter(y,range(3))->0 1 4
> map(y,range(3))->0 1 4
You are not printing the result of either the fi
vanam wrote:
> i want to know the difference between filter(function,sequence) and
> map(function,sequence).
>>> print filter.__doc__
filter(function or None, sequence) -> list, tuple, or string
Return those items of sequence for which function(item) is true. If
function is None, return the ite
vanam wrote:
> ya i am sure about that i am using python editor which has python
> intrepreter attached to it i got the same output for both filter and map
> def squ(n):
>y = n*n
> print y
> filter(y,range(3))->0 1 4
> map(y,range(3))->0 1 4
This is quite different that what you posted the
On Tue, 23 Jan 2007, vanam wrote:
> i want to know the difference between filter(function,sequence) and
> map(function,sequence).
Hi Vanam,
They may both take functions as input, but the intention of the functions
is different. In the case of filter(), the input function is used to cull
the
ya i am sure about that i am using python editor which has python
intrepreter attached to it i got the same output for both filter and map
def squ(n):
y = n*n
print y
filter(y,range(3))->0 1 4
map(y,range(3))->0 1 4
On 1/23/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
vanam wrote:
> i want t
vanam wrote:
> i want to know the difference between filter(function,sequence) and
> map(function,sequence).I tried for a simple script with an function
> which finds the square of the number,after including separately filter
> and map in the script i am getting the same results for instance
> d
i want to know the difference between filter(function,sequence) and
map(function,sequence).I tried for a simple script with an function which
finds the square of the number,after including separately filter and map in
the script i am getting the same results for instance
def squ(x):
return x*x
Luke Paireepinart wrote:
> Refer to http://docs.python.org/ref/yield.html for information about yield.
> Disclaimer: The following information I'm going to present you I came up
> with after reading that short explanation of 'yield' so it may not be
> exactly correct.
There is a longer explanat
raghu raghu wrote:
> Is there any difference between yield and print in python script?i
> have written a script based on fibonacci series where in i used yield
> and print in two different scripts:
> the script is given below:
> def fib(n):
> a,b = 0,1
> while a<=n:
>print a
>
Is there any difference between yield and print in python script?i have
written a script based on fibonacci series where in i used yield and print
in two different scripts:
the script is given below:
def fib(n):
a,b = 0,1
while a<=n:
print a
a,b = b,a+b
for x in fib(4):
print
On 6/9/06, Bernard Lebel <[EMAIL PROTECTED]> wrote:
Hey, thanks for the nice explanation Michael!BernardWhoops.. Hit "reply" instead of "reply to all". My apologies to the group. Dang gmail. -Michael
-- There's so many different worlds,So many different suns.And we have just one world,But we liv
> I'd like to know what are the differences at the various os.popenX
> flavors. I read the documentation and I can see they return file
> objects. so what can you do with these file objects? I mean, why
> would you need a set of file objects rather than another?
My OS topic covers some of the
Hey, thanks for the nice explanation Michael!
Bernard
On 6/9/06, Michael P. Reilly <[EMAIL PROTECTED]> wrote:
> Excuse the slightly pedantic discussion before I get to a real-world
> example, but the differences get into something a bit deeper than Python and
> into what is called "interproces
On Fri, Jun 09, 2006 at 03:38:58PM -0400, Bernard Lebel wrote:
> Hi,
>
> I'd like to know what are the differences at the various os.popenX
> flavors. I read the documentation and I can see they return file
> objects. so what can you do with these file objects? I mean, why
> would you need a s
Hi,
I'd like to know what are the differences at the various os.popenX
flavors. I read the documentation and I can see they return file
objects. so what can you do with these file objects? I mean, why
would you need a set of file objects rather than another?
Sorry the difference is very not c
2005/5/21, Kent Johnson <[EMAIL PROTECTED]>:
> 3*[[]] makes a list with three references to the *same* list. This can cause
> surprising behavior:
>
> >>> l=3*[[]]
> >>> l
> [[], [], []]
> >>> l[0].append(1)
> >>> l
> [[1], [1], [1]]
I see.
> Often using a dict is a good solution to thi
Mitsuo Hashimoto wrote:
> Hello,
>
> What's the difference between "[[], [], []]" and "3*[[]]" ?
[[], [], []] makes a list containing references to three different lists.
3*[[]] makes a list with three references to the *same* list. This can cause
surprising behavior:
>>> l=3*[[]]
>>> l
[[
Hello,
What's the difference between "[[], [], []]" and "3*[[]]" ?
>>> a,b,c = [[], [], []]
>>> id(a)
20609520
>>> id(b)
20722000
>>> id(c)
20721712
These ID is mutually different. But,
>>> a,b,c = 3*[[]]
>>> id(a)
20455728
>>> id(b)
20455728
>>> id(c)
20455728
>>>
These are the same.
On th
> Thing is, for people like me, you generally either don't know that a
> question is a dumb one until someone tells you the answer, (the 'of
> course' moment), or until 5 minutes after you emailed
> your query, you find the answer you were looking for...
Amen! My life's story!
Also, to Kumar.
T
Good luck trying to find a decent Python book for beginners.
I haven't been able to source Alan Gauld's book yet, (I'm saving for
Amazon's shipping... I live in the Antipodes.), but afaik that's about
the best one out, if his online tutorial (which I highly recommend
Kumar, link at end.) is indic
At 08:27 AM 12/12/2004, kumar s wrote:
Thank you for clearing up some mist here. In fact I was depressed by that
e-mail
I appreciate Alan's response and yours. I forgot that this was the Tutor
list, as I see so many Python e-mails it is easy to get confused. Please
resume seeing this list and m
Thank you for clearing up some mist here. In fact I
was depressed by that e-mail because there are not
many tutorials that clearly explains the issues that
one faces while trying to code in python. Also, due
to lack of people who are proficient in python around
our univ. campus in baltimore, i am
> Personally I am getting weary of a lot of requests that to me seem
to come
> from a lack of understanding of Python..
To be fair that is what the tutor list is for - learning Python.
> Would you be willing to take a good tutorial so you understand
> basic Python concepts and apply them to your
> Here is my code:
> >>> spot_cor=[]
> >>> for m in cor:
> ... cols = split(cor,'\t')
You are splitting the list not the item
cols = split(m, '\t')
Better to use a meaningful name too:
for line in cor:
would probably have made the mistake more obvious.
> However, when I trie
kumar s wrote:
> Here is my code:
spot_cor=[]
Create an empty list...
for m in cor:
Now, for each element in some other list from somewhere else,
... cols = split(cor,'\t')
Ignore the element we've just isolated and try to split the entire
list on '\t' ...
Traceback (most recent call last):
At 09:50 AM 12/9/2004, kumar s wrote:
[snip]
Personally I am getting weary of a lot of requests that to me seem to come
from a lack of understanding of Python.. Would you be willing to take a
good tutorial so you understand basic Python concepts and apply them to
your code.
I also despair that
764-7321
E-mail: [EMAIL PROTECTED]
Linux User Number: #201204
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of kumar s
Sent: Thursday, December 09, 2004 11:51 AM
To: [EMAIL PROTECTED]
Subject: [Tutor] Difference between for i in range(len(object)) and for
i
Dear group,
My Tab delimited text looks like this:
HG-U95Av2 32972_at432 117
HG-U95Av2 32972_at499 631
HG-U95Av2 32972_at12 185
HG-U95Av2 32972_at326 83
HG-U95Av2 32972_at62 197
I want to capture: co
98 matches
Mail list logo