List Built-in function in python
👉 FUNCTION👈
➡Cmp (compares the Elements of both list)
➡len(It is used to calculate the length of the list.)
➡max (It returns the maximum element of the list.)
➡min (It returns the minimum element of the list.)
➡list(It converts any sequence to the list.)
👉Program👈
Code and Output
🔘 Cmp is comper the two list.
👉Len👈
🔘Len is calculate the length of the list.
Example:--
◼️ Program ◼️
L1=[1,2,3,5,5,6,7,8,9]
print(len(L1)
◼️ Output ◼️
9
👉Max👈
🔘Max is maximum element of the list.
Example :-
◼️ Program ◼️
L1=[12,34,26,48,72]
print(max(L2))
◼️ Output ◼️
72
👉Min👈
🔘Min is minimum elements of the list.
Example :-
◼️ Program ◼️
L1=[12,34,56,78,90]
print(min(L1))
◼️ Output ◼️
12
👉list(seq)👈
🔘list(seq) is converts any sequence to the list.
Example :-
◼️ Program ◼️
Number=["one","two","three","four"]
Numbers.short()
print(Number)
◼️ Output ◼️
["four","one","three","two"]
~Create By niv patel~
Great blog and helpful blog for junior and new learner
ReplyDeleteThanks
DeleteNice blog and helpful
ReplyDeleteGreat blog
ReplyDeleteThanks
DeleteThanks
ReplyDeleteGood
ReplyDeleteGood job bro
ReplyDeleteTnx
DeleteGood job bro 👍
ReplyDelete