How to use min for equal-length elements In Python
Here we are finding the minimum element among the tuple of equal length elements. Where it gives the lexicographically smallest string.
Python3
# alphabets tuple alphabets = ( 'GFG' , 'gfg' , 'gFg' , 'GfG' , 'Gfg' ) res = min (alphabets) print ( 'Minimum of Tuple is' , res) |
Output:
Minimum of Tuple is GFG