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


pyg = 'ay'

original = raw_input('Enter a word:')

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

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

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


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