x = True
produces the same result as x == True
in your Python script.name:str
print(name)
name:str = str()
print(name)
What will be the output of executing the following code:
name: str = 'John'
name = name.upper()
if (name == 'John'):
print('John')
else:
print(name)
What will be the output of the following code?
my_object_1 = None
my_object_2
if (my_object_1 == my_object_2):
print("Equal")
else:
print("Not equal")
What will be the output of the following code?
thing1: str = "abc"
thing2: str = "wxyz"
print(thing1 < thing2)
Which operators are overloaded for string?
BONUS Given the code below, choose which statements will show all the methods for a string object.
thing1: str = "abc"