Q. What would be the output of the following?
(a) print(type([1,2]))
(b) print(type(1,2))
(c) print(type((1,2)))
(d) print(type(1/2))
(e) print(type([1/2]))
(f) print(type((1/2)))
(g) print(type((1/2,)))
Answer :-
(a) <class 'list'>
(b) It will give error.
(c) <class 'tuple'>
(d) <class 'float'>
(e) <class 'list'>
(f) <class 'float'>
(g) <class 'tuple'>
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )