Saturday, 25 March 2023

List-in-Built (Function)

                           

               💥 Python list Built-in functions💥


==>{Cmp}

~ Cmp is comper the two list.


==>{Len}

~ Len is calculate the length of the list.

         Example:-- 

                    L1=[1,2,3,5,5,6,7,8,9]

                    print(len(L1))

           •| Output |•

                               9 

==>{Max}

~ Max is maximum element of the list.

         Example :-

                   L1=[67,78,45,34,90]

                    print(max(L2))

        •| Output |•

                     90


=={Min}

~ Min is minimum elements of the list.

         Example :-

            L1=[12,34,56,78,90]

                    print(min(L1))

        •| Output |•

                     12


==>{seq} ‌‌‌‌

~ (seq) is converts any sequence to the list.

         Example :

                    Number=["one","two","three","four"]

                    Numbers.short()

                    print(Number)

        ◼️ Output ◼️

                   ["four","one","three","two"]


---+-------+----------+-------Created by Jay-------+--------+----------+--


                  💛Thanks for Visit 💜

7 comments:

List-in-Built (Function)

                                            💥 Python list Built-in functions💥 ==>{Cmp} ~ Cmp is comper the two list. ==>{Len} ~ Len ...