📌  相关文章
📜  第一个和最后一个上 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:32.890000             🧑  作者: Mango

代码示例1
#take user input
String = input('Enter the String :')
#start slicing the String
#take 1st character and convert it to upper case
#Concatinate the string with remaning-1 length
#take last character and change it to uppercase and concatinate it to string
String = String[0:1].upper() + String[1:len(String)-1] + String[len(String)-1:len(String)].upper()
#print the String
print(String)