Code:
mystring = "Welcome to Programs Buzz"
for word in mystring.split():
if len(word)%2 == 0:
print(word +" <-- has an even length because it has "+str(len(word)) +" chars")
elif len(word)%2 == 1:
print(word +" <-- has an odd length because it has "+str(len(word)) +" chars")
Output
Welcome <-- has an odd length because it has 7 chars
to <-- has an even length because it has 2 chars
Programs <-- has an even length because it has 8 chars
Buzz <-- has an even length because it has 4 chars