Write a Python statement to perform the following tasks: (USE BUILT_IN FUNCTIONS / METHODS ONLY)
(i) To create a new list L1 containing the elements of list L arranged in ascending order, without modifying list L.
(ii) A statement to check whether the given character, ch is an alphabet or a number.
L1 = sorted(L)
Check with L = [5, 2, 9, 1]: L1 becomes [1, 2, 5, 9] and L is still [5, 2, 9, 1]. ch.isalpha()
For ch = 'a' it gives True, so ch is an alphabet. For ch = '7' it gives False. print('Alphabet' if ch.isalpha() else 'Number') L1 = sorted(L)ch.isalpha() (True means alphabet; use ch.isdigit() to test for a number)
The SELECT statement when combined with \(\_\_\_\_\_\_\) clause, returns records without repetition.
print(16 * 5 / 4 * 2 / 5 - 8)
myStr[:4] extracts the first 4 characters, which are "MISS".myStr[-5:] extracts the last 5 characters, which are "SIPPI"."#" in between, resulting in "MISS#SIPPI".In SQL, the aggregate function which will display the cardinality of the table is \(\_\_\_\_\_\).