Thank you everyone for your help with my question - I understand what I was
doing wrong now. I know I'm posting wrongly so I'm going to go and figure out
how to do it properly for the future. Have a great day.
___
Tutor maillist - Tutor@python.org
To
Dear All - sorry to bother you. I just tried to run this program:
def isPalindrome(s):
if len(s) <= 1: return True
else: return s[0] == s[-1] and isPalindrome (s[1:-1])
isPalindrome('aba')
However when I run it in terminal it doesn't give me any answer - True or
False. (I want the program
Excellent - thank you so much everyone. All is clear now!!
From: Mark Lawrence
To: tutor@python.org
Sent: Thursday, 23 August 2012, 15:29
Subject: Re: [Tutor] Error message...
On 23/08/2012 15:17, Victoria Homsy wrote:
> Dear all,
>
> Sorry to b
Dear all,
Sorry to bother you with a beginner's problem again...
I have tried to write a program that can check if a string is a palindrome. My
code is as follows:
def isPalindrome(s):
if len(s) <= 1: return True
else: return s(0) == s(-1) and isPalindrome (s[1:-1])
isPalindrome('aba')
How
Hello all! I have a very simple question but I'm very new to python. Could you
describe to me what the following piece of Python code says in English please?
def print_a_line(line_count, f):
print line_count, f.readline()
I understand that line_count counts the number of lines in the Python pro
Hi! I am a new Python user, and would really appreciate some help. My code is
as follows:
from sys import argvs
script, mum_mood, dad_mood = argvs
# my own function
def dad_and_mum_mood(mum_mood, dad_mood):
print "If both mum and dad are in a good mood, all is good."
print "If one is and one isn