Built-in Methods

List Built-in Functions In PYTHON


FUNCTION 





 ➡ cmp (Compare the elements of both lists)


 ➡ len (Len used calculate the length of list)


 ➡ max (Return the maximum element of list)


 ➡ min (Return the minimum element of list) 


 ➡ List(seq) (Convert any sequence to the list)






    PROGRAM CODE❗


  


 ➡ 


 °Len°


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


           Print(len(L1)



°max°


            L2 = [12,34,26,48,77,11]


            print(max(L2))


°min°


           L3 = [11,2,3,4,5,33]


           Print(min(L3))



°List(seq)°


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


            Numbers.short()


            Print(Number)






   

OUTPUT ❗

➡ 


      °Len°

          9

      Max°

        77

     °min°

         2

   °List(seq)° 

['four','one','three','two']


  🖤 THANK FOR VISIT

         CREATE BY JAY

Comments

Post a Comment

Popular posts from this blog

CHAT-GPT4 & OPEN AI

How To Play Dream 11