My QA Projects

QA Projects I was involded.

View on GitHub

String Function and Operators

String Length function

len(string)

Comparison operator

str1 == str2 equality str1 !== str2 non equality str1 > str2 greater than str1 < str2 less than str1 >= str2 greater than or str1 <>= str2 less than or equal

Ord Function

ord(character)

Comparison operator Example

print("apple" < "banana")
print(ord("a"), ord("b"))
print("apple" < "Blueberry")
print(ord("a"), ord("B"))
# Output
True
97 98
False
97 66

Concatenation operator

str1 + str2

String Append Examples

a = "UC"
b = "Berkeley"
c = a + " " +b
print(c)
# Output
UC Berkeley

Membership operator

substr in string
s = "UC Berkeley"
print("Berkeley" in s)

# Output
True

  back