Why word has to be word.lower()?


#1

Here's what I wrote originally, and it worked.

pyg = "ay"

original = raw_input("Enter what you want to drink now")

if len(original) > 0 and original.isalpha():
print original
else:
print "Empty"

first_letter = original[0]
new_word = original[1:len(original)]

print new_word + first_letter + pyg

But I found that originally it has to be like below.
word = original.lower()
first_letter = word [0]

why it should be ".lower()"?


#2

Converting user input to lower case is something programmers generally do to make it easier to parse input text. That way, there is no need to write extra functionality into your code to deal with both upper and lower case. Just let the python library functions handle all the tedious stuff and work on checking the bare minimum in the user input.