-1

I want to find the max value of a number that consists of for example:

  • 123 (max digit is 3)
  • 346 (max digit is 6)

like that.

I know how to find among several numbers:

numbers = [9, 34, 11, -4, 27]

# find the maximum number
max_number = max(numbers)
print(max_number)

But I can't find in a number.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
agnla
  • 1

1 Answers1

-2

#this is just an example for maximum numbers

numb = [11,21,211,5,-7,0] temp = max(numb) print(temp)