i have a clarification regarding built in function,in some scripts it is
being used and it is give n: if _name_ == '_main_'
why this is being used in the scripts?
On 1/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Send Tutor mailing list submissions to
tutor@python.org
To subscrib
Hi everyone,
I have a quick quick question joining out of order dictionary values.
For example:
I created an empty
config={}
Added some key/value pairs
config["test1"]="elem1"
config["test2"]="elem2"
config["test3"]="elem3"
etc
Dumped the values and joined them at the same time.
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
i am following 'dive into python' for learning. i come across a term
getattr() which gives reference about a function.Its written it can be used
as a dispatcher. Below example given for that builtin function:
import statsout
def output(data,format='text'):
output_function = getattr(statsou
can i follow 'Learning Python' by oreily. Is it good for beginners? can any
one suggest me i am planning to buy a hard copy (text book)
--
Vanam
___
Tutor maillist - Tutor@python.org
http://mail.python.org/
I dont have any programming background, i know only c language.
On 1/18/07, wesley chun <[EMAIL PROTECTED]> wrote:
On 1/17/07, raghu raghu <[EMAIL PROTECTED]> wrote:
> can i follow 'Learning Python' by oreily. Is it good for beginners? can
any
> one suggest me i