0

square brackets in python?

Hi, I'm just starting learning python in these days and I see in the challenges that a lot of codes contain something like [1] or [0] or more generally I don't understand what are them used for

7th Apr 2018, 5:38 PM
luca D'este
luca D'este - avatar
2 Respostas
+ 3
List are a structure data type in python,like tuple,set ,string,and dictionnary.Square brackets indicates that we use a list.To create a list give it a variable name and assign it to a collection of data separated by comma inside square brackets. a = [1,2,"fg",6]
7th Apr 2018, 9:11 PM
HBhZ_C
HBhZ_C - avatar