I am new to python. I have used c before. There we can work character by character using indexing in string. I was trying to convert the whole string to lower case, reverse it and print it with first character in upper case
first_name = input("enter your first name\n")
last_name = input("enter your last name\n")
first_name = first_name.lower()
last_name = last_name.lower()
def rev(s):
str = ""
for i in s:
str = i + str
return str
first_name = rev(first_name)
last_name = rev(last_name)
first_name[0].upper()
last_name[0].upper()
print(first_name + " " + last_name)
The output is
enter your first name
Manash
enter your last name
Sharma
m s