Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python capitalize first letter of string without changing the rest

string[0].upper() + string[1:]
Comment

python first letter to capitalize

my_string = "programiz is Lit"

cap_string = my_string.capitalize()

print(cap_string)
Comment

python first letter to capitalize

my_string = "programiz is Lit"

print(my_string[0].upper() + my_string[1:])
Comment

PREVIOUS NEXT
Code Example
Python :: create virtual environments python 
Python :: python bit shift by 3 
Python :: progress bar in cmd python 
Python :: change color of text button pyqt5 
Python :: access row of dataframe 
Python :: keras declare functional model 
Python :: create an empty list of lists in python 
Python :: groupby and sort python 
Python :: python list of dictionaries to excel 
Python :: django render template 
Python :: python create directory if non existent 
Python :: get the name of a current script in python 
Python :: django queryset first element 
Python :: how to remove quasi constant column in pandas dataframe 
Python :: aws lambda environment variables python 
Python :: stack queue in python 
Python :: Load dataset from seaborn 
Python :: how to change index date format pandas 
Python :: how to count null values in pandas and return as percentage 
Python :: How to join two dataframes by 2 columns so they have only the common rows? 
Python :: how to use fastapi ApiClient with pytest 
Python :: how to concat on the basis of particular columns in pandas 
Python :: calculator in python 
Python :: Python Requests Library Patch Method 
Python :: divisible in python 
Python :: pyspark dataframe to parquet 
Python :: button tkinter 
Python :: extract email address using expression in django 
Python :: how to make python file executable 
Python :: Download video from a direct URL with Python 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =