Python Programming Training Certification
Flexible Hours
100 Assignments
Instructor Led online Training
50 LMS Access
24X7 Support
100% Skill Level
Enquire Now
Course Overview
Python len() Function
The python len() function is used to return the length (the number of items) of an object.
Signature
- len(object)
Parameters
object: An object that must be a sequence(string, tuple, list etc.) or a collection(dictionary, set etc.)
Return
It returns the length (the number of items) of an object.
Python len() Function Example 1
The below example shows the length of string.
- strA = ‘Python’
print(len(strA))
Output:
- 6
Explanation: The above example returns the length of a string strA by using len() function.
Python len() Function Example 2
The below example shows the length of list.
- listA = [‘Python’, ‘C’, ‘C++’, ‘Java’]
print(len(listA))
Output:
- 4
Python len() Function Example 3
The below example shows the length of dictionary.
- dictA = {
‘name’: ‘Phill’, ‘university’: ‘GTU’, ‘ID’: 1107
}
print(len(dictA))
Output:
- 3
Candidate’s Journey During Our Training Program
Expert’s Advice & Selection of Module
Choosing the right type of module for the training is half the battle & Our Team of experts will help & guide you.
Get Trained
Get Trained & Learn End to End Implementation from our Expert Trainer who are working on the same domain.
Work on Projects
We Do make our student’s work on multiple case studies , scenario based tasks & projects in order to provide real-time exposure to them.
Placements
We have a dedicated placement cell in order to provide placement assistance & relevant interviews to our candididates till selection
Placement Partner