what will be the value of len(L)
Answers
Answered by
0
Answer:
What will be the output of the following Python code? advertisement. def f(i, values = []): values.append(i); return values ... while i < len( L):
Answered by
0
Answer:
len() function returns the number of items of an object.
Failing to pass an argument or passing an invalid argument will raise a TypeError exception.
testList = [] print(testList, 'length is', len(testList)) testList = [1, 2, 3] print(testList, 'length is', len(testList)) testTuple = (1, 2, 3) print(testTuple, 'length is', len(testTuple)) testRange = range(1, 10) print('Length of', testRange, 'is',
Similar questions