Python list Built-in Function

 👉 Python list Built-in functions 👈


⭐ Cmp ⭐

🔘 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"]



              Created by : - krish Akbari


      Thank for visit 




6 Comments

Previous Post Next Post