Hello. I am Roman. I bought this book call Python Programming for the Absolute
Beginner which I am and after I downloaded Python 2.3.5 from their CD, I opened
IDLE, typed "Game Over" and nothing happened. What do I do? Please, help. I
don't understand any of the programming jargon. Please talk s
On Wed, Sep 23, 2009 at 12:58 AM, kevin parks wrote:
> It appears it is not so impenetrable as i initially
> though. Well iterators
> aren't maybe, but generator do look tricky. So interators iterate over
> lists, tuples, strings, dictionaries
> and any data type that is iterable, and generators
On Wed, 2009-09-23 at 01:10 -0700, rspl...@earthlink.net wrote:
> Hello. I am Roman. I bought this book call Python Programming for the
> Absolute Beginner which I am and after I downloaded Python 2.3.5 from
> their CD, I opened IDLE, typed "Game Over" and nothing happened. What
> do I do? Please,
#Message backward printer
message=input('Enter your message: ')
for i in range(len(message),0,-1):
print(message)
This is the code which I have written. All it does is count the number of
letters starting from backwards. The proper code should so something like this:
Enter your message: Hi
Try reading up on sequences and slicing. They offer a very elegant solution
to your (homework?) problem.
http://docs.python.org/tutorial/introduction.html#strings
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http
> http://docs.python.org/tutorial/introduction.html#strings
>
The below page is a better introduction to sequences:
http://effbot.org/zone/python-list.htm
It uses lists, but the lessons on slicing also apply to strings (which
are a type of sequence).
HTH!
Serdar
Hello. I am Roman.
Hi Roman.
I bought this book call Python Programming for the Absolute Beginner
which I am and after I downloaded Python 2.3.5 from their CD,
I opened IDLE, typed "Game Over" and nothing happened.
Why did you do that? Did the book say to do it?
Are you sure that's what it s
"Ali Sina" wrote
#Message backward printer
message=input('Enter your message: ')
for i in range(len(message),0,-1):
print(message)
This is the code which I have written.
All it does is count the number of letters starting from backwards.
Correct, plus it prints the original message eac
>> Hello. I am Roman. I bought this book call Python Programming for
>> the Absolute Beginner which I am and after I downloaded Python 2.3.5
>> from their CD, I opened IDLE, typed "Game Over" and nothing
>> happened. What do I do? Please, help. I don't understand any of the
>> programming jargon. P
Is there a significant difference in speed, style, or any pythonesque
reasoning between Alan's solution and
print message[::-1]
Thanks for any information,
Robert
On Wed, 2009-09-23 at 18:51 +0100, Alan Gauld wrote:
> "Ali Sina" wrote
>
> #Message backward printer
> message=input('Enter you
Hi,
Thanks you guys for the replies and thanks Kent for the explanation, and
yes, this:
self.cursor.execute("SELECT CUSTID FROM Stories WHERE NAME= ?", (name, ))
using the comma did make it work.
On Fri, Sep 18, 2009 at 3:40 PM, Jeff Johnson wrote:
> Thanks for the clarification Kent!
>
>
> Ke
Hi guys,
I'm getting this error after I tried to switch from python 2.3 to 2.6. I
tried to look online for what it means, but I can't find any good
explanation.
Do any of you guys have any idea what's causing it and what it means?
C:\Python26\lib\site-packages\win32\lib\dbi.py:13: DeprecationWarnin
On 9/23/2009 7:22 AM Ali Sina said...
#Message backward printer
message=input('Enter your message: ')
for i in range(len(message),0,-1):
print(message)
This is the code which I have written. All it does is count the number of
letters starting from backwards. The proper code should so some
On Thu, Sep 24, 2009 at 5:46 AM, Kristina Ambert
wrote:
> Hi guys,
> I'm getting this error after I tried to switch from python 2.3 to 2.6. I
> tried to look online for what it means, but I can't find any good
> explanation.
> Do any of you guys have any idea what's causing it and what it means?
>
> Is there a significant difference in speed, style, or any pythonesque
> reasoning between Alan's solution and
> print message[::-1]
Yes, the for loop doing one character at a time will be much
slower than using a slice. The slice is more pythonic but less general.
A reverse loop is something
Thank you for the clear explanation.
Robert
On Wed, 2009-09-23 at 23:40 +, ALAN GAULD wrote:
> > Is there a significant difference in speed, style, or any pythonesque
> > reasoning between Alan's solution and
> > print message[::-1]
>
>
> Yes, the for loop doing one character at a time
16 matches
Mail list logo