Built in function in list python

🔴Built in function in list python programming🔴
🟠There are five type of list function 🟠
1.Compare
2.Length
3.Maximum
4.Minimum
5.Sequence

print("Example of cmp")
list1 = [1,2,3,4,5,6]
list2 = [7,8,9,5,10]
for x in list1:
    for y in list2:
        if x==y:
            print("the common element is:",x)
            

print("Example of len")     
list1=["devang","divya","jayraj"]       
print(len(list1))


print("Example of maximum")
list1 = [90,19,23,5,60]
print(max(list1))


print("Example of minimum")
list1 = [90,19,23,5,2]
print(min(list1))


print("Example of sequence")
str = "Devang"
V =list(str)
print(type(V))



Output




Example of cmp
the common element is: 5
Example of le

Example of maximu
9
Example of minimu

Example of sequenc
<class 'list'>


  Thank you for visit again




Comments

Post a Comment