+ 5
can we input the some values using lists by mentioning the no of values....like in c++...
learning lists
3 ответов
+ 3
ohk...thx...
+ 2
plz answer me...
+ 2
No, you can't. You can initialize an empty list:
ls = []
Or initialize a list with elements:
ls = [1, 2, 3]
Remember, you can add values to a list by using append():
ls = []
ls.append(1)
# list is now [1]