Python code error. defining the character of the first word -


if first letter of ln 'a', print python telling define 'a'. how define first letter.

my code

print("enter first name") fn = input("name\t") print("enter last name") ln = input("name\t") print("enter month of birth eg. jan-1") num = int(input("no\t")) print('\n') print('first name %s, last name %s, month of birth %d' %(fn,ln,num))  if(fn[0] == chr(a)):     print('first letter a') 

just define string literal:

if fn[0] == 'a': 

Comments