Does this code make sense for returning the first letter of the answer as far as how it's structured?


#1

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
word = original.lower()
first = word[0]
print first
else:
print 'empty'


How do you return the first letter of different strings in an array?
#2

yes, this makes perfect sense :slight_smile: well done, why do you doubt?


#3

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