[Tutor] A very simple question
Nicole Seitz
Nicole.Seitz@urz.uni-hd.de
Thu, 30 May 2002 16:34:41 +0000
Hi there!
I'd like to write a function that gets a list , checks if there are only=20
strings in the list starting with a lowercase letter and then returns 1 i=
f=20
only lowercase, 0 if not.
How can I do that?
example list:
myList =3D [ "abc", "def", "Cde"]
If I write:
def checkIfOnlyLower(list):
for item in list:
if item[0].islower():
return 1
else:
return 0
the function will return 1 as soon as it comes to the first string starti=
ng=20
with a lowercase letter.But that's not what I want.
Hope you can help me.
Thanks in advance.
Nicole