Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

first and last upper

#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)
Comment

PREVIOUS NEXT
Code Example
Python :: get next iterator without incrementing python 
Python :: django foriegn key filter sample 
Python :: break up word in clomun pandas 
Python :: set column as category datatype 
Python :: python last letter of string 
Python :: minimum ele 
Python :: image.show pillow mac os 
Python :: to find keywords in a text spacy 
Python :: scikit learn introduction 
Python :: how to plot a counter output 
Python :: MEMORY MANAGEMENT SYSTEM IN PYTHON 
Python :: how to remove explicit string concatenation 
Python :: how to insert image in python 
Python :: newick string python 
Python :: assign more than one variable at a time on a single line in python 
Python :: python dataframe copy structure 
Python :: if condition in python 1 
Python :: compute difference of all the combinations of 2 arrays 
Python :: django get all models 
Python :: Get the positions of items of ser2 in ser1 as a list python 
Python :: oop - Apa metaclasses di Python 
Python :: how to set text in QComboBox pyqt5 
Python :: plot line2d on axis 
Python :: num1=int(self.t1.get()) 
Python :: one2many add tuple 
Python :: how to get a random number between 1 and 10 in python 
Python :: ladnha; 
Python :: pandas 3d tutorail pythoin 
Python :: create line in canvas widget object 
Python :: print e 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =