Python List clear() & copy() Method

0

Python List clear() Method

  • The clear() method removes all items from the list. 

Syntax

  • list.clear()

Parameter Values

  • The clear() method doesn't take any parameters.

Python List copy() Method

  • The copy() method returns a shallow copy of the list.

Syntax

  • list.copy()  

Parameter Values

  • The copy() method doesn't take any parameters.

 

 

 

 


 

 

 

 

 

 

Post a Comment

0Comments
Post a Comment (0)