Tutorials Point


  Python Basics
  Python Advanced
  Python Useful References
  Python Useful Resources
  Selected Reading

© 2011 TutorialsPoint.COM


  Home     References     Discussion Forums     About TP  

Python Tuple max() Function


previous next AddThis Social Bookmark Button


Description:

This function returns the elements from the tuple with maximum value.

Syntax:

max(tuple)

Parameters:

Here is the detail of parameters:

  • tuple: a tuple from which max valued element to be returned.

Return Value:

It returns the elements from the tuple with maximum value.

Example:

#!/usr/bin/python

tuple1, tuple2 = (123, 'xyz', 'zara', 'abc'), (456, 700, 200)

print "Max value element : ", max(tuple1);
print "Max value element : ", max(tuple2);

This will produce following result:

Max value element :  zara
Max value element :  700


previous next Printer Friendly



  

Advertisement

Online Image Processing

Indian Baby Names