+ 2
Comparing
How can i compare to str by < and>?
4 odpowiedzi
0
what do you want to compare?
the length?
or test if a number inside a string is higher than a number in another string?
or something else?
+ 5
The length of 2 strings is easy to compare.
a = "hello"
b = "out there"
if len(a) > len(b):
print("a is bigger than b")
else:
print("b is bigger than a")
+ 1
the length!
0
thanks so much