8 questions
CAN A VALUE IN A TUPLE BE EDITED?
YES, IT CAN BE DONE JUST AS WE DO WITH LISTS
NO, TUPLE IS AN IMMUTABLE DATA TYPE
How to create a single element tuple
(1,)
(1)
{1}
[1]
tuple([1])
Result of the program above is
('1', '2', '3', '4', '5')
(1, 2, 3, 4, 5)
12345
"12345"
What is the output of the program above
<class 'tuple'>
<class 'None'>
<class 'list'>
<class 'int'>
Which of the following is true
a is assigned a value of 1
b is assigned a value of [2,3]
b is assigned a value of (2,3)
b is assigned a value of 2
CAN YOU USE TWO STRING INPUTS IN TUPLE
YES, IT CAN BE USED
IT CAN BE USED BUT THE OUTPUT WILL BE A SINGLE STRING
NO, IT CAN'T BE DONE
NONE OF THE ABOVE
Pick the odd one in connection with collection data type
List
Tuple
Dictionary
Loop
For tuples and list which is correct?
List and tuples both are mutable.
List is mutable whereas tuples are immutable.
List and tuples both are immutable.
List is immutable whereas tuples are mutable