Python String Methods

Python String rstrip( ) Method

  • The rstrip( ) method returns a copy of the string with trailing characters removed.

  • The rstrip( ) removes characters from the right based on the argument.

  • Pop data from the right hand side.

Syntax

  • string.rstrip([chars])

Parameters

  • characters    :   A set of characters to remove as trailing characters

Python String min( ) Method

  • The min( ) function returns the smallest of the input values.

Syntax

  • min(iterable)  

  • min(n1, n2, n3, ...)   

Parameter

  • n1, n2, n3, ...   :  One or more items to compare

  • iterable            :  An iterable, with one or more items to compare

Python String max( ) Method

  • The max( ) function returns the largest of the input values.

Syntax

  • max(iterable)  

  • max(n1, n2, n3, ...)   

Parameter

  • n1, n2, n3, ...   :  One or more items to compare

  • iterable            :  An iterable, with one or more items to compare

 

 

 

 

 

 

 

 

 

 

 

Comments