If you want to create a literal new list with a bunch of new values then you're right. There is no reason to use the list constructor, you should use the literal notation:
my_list = ['a', 'b', 'c']
In fact, it is impossible to create a new list with a bunch of values using the constructor, you can only use it to transform iterables into their list representation:
my_tuple = ('a', 'b', 'c') # literal notation to create a new tuple
my_list = list(my_tuple) # this is what you actually did in your first example
You can use the other iterable constructors like set and dict in a similar way. They are not used to create new objects, but transform existing ones into the type they describe.
How to pass a list in constructor?
`list()` constructor and `__len__` method
Videos
If you want to create a literal new list with a bunch of new values then you're right. There is no reason to use the list constructor, you should use the literal notation:
my_list = ['a', 'b', 'c']
In fact, it is impossible to create a new list with a bunch of values using the constructor, you can only use it to transform iterables into their list representation:
my_tuple = ('a', 'b', 'c') # literal notation to create a new tuple
my_list = list(my_tuple) # this is what you actually did in your first example
You can use the other iterable constructors like set and dict in a similar way. They are not used to create new objects, but transform existing ones into the type they describe.
Perhaps we want to convert a Map or Set into a list. We would pass it into the constructor.
mylist = list(myset)
New in Python Please guide
Want to write simple class for Matrix addition using concept of operator overloading