Alan Ting wrote:
Hello,
How do I get the characters to separate?
This is what I did.
def personalNote(name):
'Print a personalized love note'
x = (name)
Oh, I forgot to mention... the line x = (name) is utterly pointless. Instead
of wasting time with x=name, just use name everywhere yo
Alan Ting wrote:
Hello,
How do I get the characters to separate?
It isn't clear what you mean. Do you mean this?
"JOON" => "J O O N"
If so:
' '.join('JOON')
will do it.
--
Steven
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
Hello,
How do I get the characters to separate?
This is what I did.
def personalNote(name):
'Print a personalized love note'
x = (name)
print (x + ", I love you so.")
print ("You brighten my day.")
print ("Oh, " + x + "!")
print ("I wish you could be with me always")
Write
Surya K wrote:
I am actually using a activestate wrapper for calculating execution time of my
program.
[...]
I tested it for a puzzle and that showed me around 1385.33 usec/sec..However, as its from facebook hackers cup where I got a penalty time of 28.32.00 (not exactly, forgot)..
what units
> Well, using python documentation, I did this..
>
> (calculating execution time).
>
> def main():
> ## This is my whole puzzle code...
>
>
> fobj_ip = open('D:/code/py/input.txt', 'r')
> fobj_op = open('D:/code/py/output.txt','w')
>
> line=1
> for eachLine in fobj_ip:
>
I am actually using a activestate wrapper for calculating execution time of my
program.
This is the code
#!/usr/bin/python# A simple wrapper for the timeit module.import timeit
def Timeit(func,number=1,module="__main__"):""" A wrapper which can
be used to time any function """
n
Date: Fri, 27 Jan 2012 17:35:39 -0800
Subject: Re: [Tutor] compile time calculator
From: marc.tompk...@gmail.com
To: sur...@live.com
CC: tutor@python.org
On Fri, Jan 27, 2012 at 7:46 AM, Surya K wrote:
Hi,
I want to calculate compile time for my puzzles.
Since nobody else has mentioned i
hi everyone,
I want to make a web page which has to include some python script and html
tags as well, am not getting how to do that .
I searched some articles but cant understand them .
is there anything like linking an external html file into python script ?
Can u please help for same
waiting fo
On 28/01/12 05:55, Michael Lewis wrote:
I am trying to round a float to two decimals, but I am getting the
following error:
Traceback (most recent call last):
File "", line 1, in
PaintingProject()
File "C:/Python27/Homework/Labs/Lab 03_5.py", line 42, in PaintingProject
print 'T