4.check yourself


#1

My code is like this:
original = raw_input(“Enter a word:”)
if len(original)>0:
print original
else:
print “empty”

And I input a space, but the console didn’t show the string “empty”. Why?


#2

spaces count as characters. You will isalpha in the next exercise to fix this


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.