0

What does " [ ] " mean in Python?

I can't understand it

8th Nov 2020, 5:57 PM
Azamat
Azamat - avatar
7 Réponses
+ 2
It is used to create list in python programming language List is sequence of any string, object, int or objects. a = [1,2,5,8] In list a you can get elements by this a[0] is 1 a[2] is 5
8th Nov 2020, 6:09 PM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar
+ 1
Complete you Python course and then you will come to know.
8th Nov 2020, 6:07 PM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar
+ 1
It can be used to create lists or extract list slices from list or strings #list creation A_list = [ 1,2,3 ] #prints the first character of string Var = txt[0] #reverses string Res = txt.[::-1]
9th Nov 2020, 8:07 PM
Avijeet Singh
Avijeet Singh - avatar
0
Thanx
8th Nov 2020, 6:07 PM
Azamat
Azamat - avatar
0
I will complete it
8th Nov 2020, 6:08 PM
Azamat
Azamat - avatar
0
As soon as possible
8th Nov 2020, 6:08 PM
Azamat
Azamat - avatar
0
Ok
8th Nov 2020, 6:11 PM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar