Answers for "find largest number in string python"

1

python find largest variable

x = 1
y = 2
z = 3
var = {x:"x",y:"y",z:"z"}
max(var)
var.get(max(var))
var.get(min(var))
----OUTPUT----
3
z
x
Posted by: Guest on February-08-2021
-1

get the largest of 2 strings python

s1 = 'longlongstring'
s2 = 'shortstring'

longestString = max(s1, s2, key=len)

# returns 'longlongstring'
Posted by: Guest on June-10-2020

Code answers related to "find largest number in string python"

Python Answers by Framework

Browse Popular Code Answers by Language