How to Capitalize Each String in a List of Strings in Python | EP-26 String Capitalize() Method

Subscribers:
29,300
Published on ● Video Link: https://www.youtube.com/watch?v=GeYrd5Ok4k0



Duration: 0:00
75 views
2


Capitalize Each String In A List Of Strings In Python
"""
Below are the methods of Capitalize Each String In A List Of Strings In Python.

Using a For Loop
Using List Comprehension
Using Map Function

"""
1. Capitalize Each String In A List of Strings Using a For Loop
fruits = ['apple', 'orange', 'banana', 'papaya']
cap_list = []
for word in fruits:
print(word)
cap_list.append(word.capitalize())
print(cap_list)

2. Capitalize Each String In A List Of Strings Using List Comprehension
capi_list=[word.capitalize() for word in fruits]
print(capi_list)

3. Capitalize Each String In A List Of Strings Using Map Function
""""""
c_list=list(map(str.capitalize,fruits))
print(c_list)

#Python #PythonTutorial #StringManipulation #Coding #Programming #LearnPython #PythonTips #PythonForBeginners #StringCapitalize #PythonCode #PythonProgramming #PythonTricks #CapitalizeString #PythonList

Connect With Us:
—————————————
➡️ Website: https://www.cybrosys.com/
➡️ Email: info@cybrosys.com
➡️ Twitter:   / cybrosys  
➡️ LinkedIn:   / cybrosys  
➡️ Facebook:   / cybrosystechnologies  
➡️ Instagram:   / cybrosystech  
➡️ Pinterest:   / cybrosys  




Other Videos By Cybrosys Technologies


2024-08-18Customer Statement Report in Odoo 18 | How to Generate Customer Statements Report in Odoo 18
2024-08-15Quoted Search for Exact Match in Odoo 18 | Odoo 18 New Features | Odoo 18 Expected Features |Odoo 18
2024-08-15How to Format String in Python | EP-27 String Formatting in Python | Python Tutorials
2024-08-15How to Create Maintenance Request in Odoo 17 | Odoo 17 Maintenance App |Odoo 17 Functional Tutorials
2024-08-13How to Create a Helpdesk Ticket in Odoo 17 | Odoo 17 Help Desk App | Odoo 17 Functional Tutorials
2024-08-13Odoo 18 Attendance Kiosk | Odoo 18 Attendance PWA | Odoo 18 New Features | Odoo 18 Tutorials
2024-08-12How to Configure Task Management in Odoo 17 Field Service | How to Manage Task Creation in Odoo 17
2024-08-12New Employee Login Screen in Odoo 18 POS | Odoo 18 Point of Sale | Odoo 18 New Features | Odoo 18
2024-08-11Bank Account Menu in Odoo 18 Employee App | Odoo 18 New Features | Latest Features in Odoo 18
2024-08-11How to Create Worksheet Template in Odoo 17 Field Service | Customize Worksheet in Odoo 17
2024-08-08How to Capitalize Each String in a List of Strings in Python | EP-26 String Capitalize() Method
2024-08-07How to Create Timesheets Report Using Odoo 17| Timesheet Reports in Odoo 17| Odoo 17 Tutorials
2024-08-07How to Apply Within Operator in Custom Filter in Odoo 18| Within Operator in Odoo 18 Domain Selector
2024-08-06How to Create Separate Skill Zones in Recruitment Software | Skill Zone Management in Horilla HRMS
2024-08-06How to Remove a Character From a String in Python | EP-25 How to Remove Letters From a String
2024-08-06Quick Login Option to Land in Odoo 18 | Odoo 18 New Features | Odoo 18 Latest Features | Odoo 18
2024-08-05Check if a String is Palindrome or Not in Python | EP-24 Python Program to Check Palindrome
2024-08-05How to Set Up Recruitment Stages in Recruitment Software | Free Recruitment Software | Horilla HRMS
2024-08-05New Widget to Record Invoice Line Description Odoo 18 |Odoo 18 New Features |Odoo 18 Latest Features
2024-08-04What is Escape Sequence in Python | EP-23 Escape Sequence in Python | Escape Characters in Python
2024-08-04Select Product Variant Pop Up In Odoo 18 Point Of Sale | Odoo 18 POS | New Features in Odoo 18