do 'list' demand a sequence of same datatype
Answers
Answered by
1
Answer:
No, lists do not demand the sequence of same datatype.
Explanation:
You can enter a a variety of datatypes in a list as shown:
list=["prince",201261, 12.23, ("yes", "I", "added", "a", "tuple", "too") , {"dictionary?" : "check"}, ["another_list", "check"]]
And this one is perfectly legal.
In case you're still not sure, see the image to verify the code.
Attachments:
Similar questions