👤

does a python list need to be homogeneous(contains similar items)? Why or why not?​

Sagot :

Answer:

  • Lists in Python can be heterogeneous, but by the general convention it is preferable that they only contain homogeneous elements. Python tuples are the natural data structure for heterogeneous sequences.

Explanation:

#LearnWithBrainly

#CarryOnLearning