 python | SoloLearn: Learn to code for FREE!

+4

# python

What does c=a+b mean by b?

+15

D구산중학교원인성 if b is a list then it's second, because array/list index starts with zero so... if b = [7,5,3,6] b gives 7(that is our first element in b) b gives 5(which is our second element in b)

+8

The second element of b

+7

The second element of b

+6

It would always be a good and helpful idea, if the question will be completed by the related code. Thanks!

+4

Here a is variable and b is list b means second element of list And a + b means they are adding it or concatinating it For ex a = 5 b = [1, 2, 3, 4, 5.....] here, b = 0 (because index start with 0) So, b = 2 And, a + b = 5 + 2 = 7 Hope You understood.

+3

+3

The second element of b

+3

why b is second element of b?

+3

D구산중학교원인성 becouse b is list so that indexing is start from 0 that is , first element has index 0 , second element has index 1 , third element has index 2 and so on....

+3

If b is an array then, It's first position can be called as b For ex. If array b has value [2,3,4] Then b is 2 and it runs same through array like b must be 3 in this case and same b will be 4

+2

It is covered in the Python course here: https://www.sololearn.com/learn/Python/2431/ The first element has the index 0, the second element the index 1 and so on....