I'd like to write a program to help find words for Scrabble but I've
been having trouble
right from the beginning.
tiles = 'aeirstw'
dictionary = ['aardvark', 'cat', 'dog', 'taste', 'stare', 'wrist']
for word in range(len(dictionary)):
for letter in range(len(dictionary[word])):
if d
Wayne Watson wrote:
> That's the question in Subject. For example, the difference between
> 08/29/2008
> and 09/03/2008 is +5. The difference between 02/28/2008 and 03/03/2008 is 4,
> leap year--extra day in Feb. I'm really only interested in years between,
> say,
> 1990 and 2050. In other wor
Keegan Johnson wrote:
> I need to get the pygames, py2app, etc on my computer
> (I have a Macintosh). Is there any way to clean up all these files
> that I've accrued trying to get things to work? I've been able to do
> a little bit but nothing more than that. Also, what should I use?
> Th
Kent Johnson wrote:
>
> It looks like Gustavo Niemeyer's dateutil module will at least do the
> year/month/day calculation if not the formatting:
>
> In [1]: from datetime import date
> In [2]: from dateutil import relativedelta
> In [3]: now = date.today()
> In [9]: rd = relativedelta.relativedel
Alan Gauld wrote:
> "R. Alan Monroe" <[EMAIL PROTECTED]> wrote
>
>
>>> Is there a way to have the output of "print tis" in the same format
>>> as
>>> "print now" and "print tafmsd" in the code below?
>>>
>
>
>>> >>> now = datetime.date.today()
>>> >>> print now
>>> 2007-04-01
>>> >
Is there a way to have the output of "print tis" in the same format as
"print now" and "print tafmsd" in the code below?
Thanks,
Will
savage:~ wallison$ python
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type "help", "copyright", "credits
Caicedo, Richard IT2 NSWC wrote:
>
> I am trying to get the $ python promt I can't seem to get it. I can
> get the python shell but when I press enter I don't get the $ python?
>
>
>
> ___
open('test_highlight.html', 'a').write(in_put)
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of William Allison
> Sent: Saturday, September 30, 2006 8:10 AM
> To: tutor@python.org
> Subject: Re: [Tuto
Shantanoo Mahajan wrote:
> +++ William Allison [29-09-06 18:55 -0400]:
> | Hi,
> | Just learning Python, on chapter 6 of Learning Python 2nd Ed. So, on to
> | the question. Is there a better way to
> | implement the code below? It scans a saved html file and highlights
> | c
Hi,
Just learning Python, on chapter 6 of Learning Python 2nd Ed. So, on to
the question. Is there a better way to
implement the code below? It scans a saved html file and highlights
certain keywords is a bold, red font. It works,
but I suppose I'm wondering if it's the "Pythonic" way.
Thanks
Hi,
I'm new to programming and started with Perl but have been reading a lot
of good things about Python. Thought I would switch before I have too
much time invested in Perl.
Anyway, my question is, is there something in Python similar to the
diamond operator and chomp from Perl? I'm trying to re
Danny Yoo wrote:
On Sat, 4 Dec 2004, William Allison wrote:
I compiled Python 2.3.4 from source, but now I would like to upgrade to
2.4. There doesn't seem to be a "make uninstall" target for 2.3.4.
Will compiling 2.4 overwrite the older version, or will I have two
versions
I compiled Python 2.3.4 from source, but now I would like to upgrade to
2.4. There doesn't seem to be a "make uninstall" target for 2.3.4.
Will compiling 2.4 overwrite the older version, or will I have two
versions of Python on my system?
Thanks,
Will
__
13 matches
Mail list logo