How Do You Capitalize The First Two Letters May 25, 2024 Post a Comment I have usernames that are in this format RSmith. I can put them in all upercase or Title them to look like this, Rsmith, but I need RSmith. current script: import csv app_csv =Solution 1: You can use basic string slicing:s = 'rsmith' s = s[:2].upper() + s[2:] print(s) CopyOutput: RSmith CopyBaca JugaHow To Apply String Methods To Multiple Columns Of A DataframeModification Of Skipping Empty List And Continuing With FunctionInvalid Value After Matching String Using Regex Share You may like these postsPython Pandas - Find Consecutive Group With Max Aggregate ValuesHow To Group By Multiple ColumnsModifying Sign Up Tab Created Using Django FrameworkPython Pandas - Merge Based On Substring In String Post a Comment for "How Do You Capitalize The First Two Letters"
Post a Comment for "How Do You Capitalize The First Two Letters"