Python tuple method max() returns the elements from the tuple with maximum value.
Following is the syntax for max() method −
max(tuple)
This method returns the elements from the tuple with maximum value.
The following example shows the usage of max() method.
#!/usr/bin/python tuple1, tuple2 = (123, 'xyz', 'zara', 'abc'), (456, 700, 200) print "Max value element : ", max(tuple1) print "Max value element : ", max(tuple2)
When we run above program, it produces following result −
Max value element : zara Max value element : 700