Assertion (A): The expression "HELLO".sort() in Python will give an error.
Reason (R): sort() does not exist as a method/function for strings in Python.
Mark the correct choice:
The sort() method is not defined for string objects in Python. It is used for lists, not strings. Therefore, trying to use sort() on a string object like "HELLO" results in an AttributeError, making both the assertion and reasoning true, with (R) correctly explaining (A).
a = 20 def convert(a): b = 20 a = a + b convert(10) print(a)Select the correct output from the given options:
Fill in the blank:
\(\_\_\_\_\_\_\_\_\) is a set of rules that needs to be followed by the communicating parties in order to have a successful and reliable data communication over a network.
The code given below accepts five numbers and displays whether they are even or odd:
Observe the following code carefully and rewrite it after removing all syntax and logical errors.
Underline all the corrections made.
In SQL, the aggregate function which will display the cardinality of the table is \(\_\_\_\_\_\).
event = "G20 Presidency@2023"
L = event.split(' ')
print(L[::-2])
myStr = "MISSISSIPPI" print(myStr[:4] + "#" + myStr[-5:])