Computer Science
Complete the code to create a list of every integer between 0 and 100, inclusive, named nums1 using Python, sorted in increasing order.
Python List Manipulation
16 Likes
Answer
nums1 = list(range(101))
Answered By
7 Likes
Related Questions
Find the errors:
L1 = [3, 3, 8, 1, 3, 0, '1', '0', '2', 'e', 'w', 'e', 'r'] print(L1[: :-1]) print(L1[-1:-2:-3]) print(L1[-1:-2:-3:-4])
What will be the output of following code?
x = ['3', '2', '5'] y = '' while x: y = y + x[-1] x = x[:len(x) - 1] print(y) print(x) print(type(x), type(y))
Let nums2 and nums3 be two non-empty lists. Write a Python command that will append the last element of nums3 to the end of nums2.
Consider the following code and predict the result of the following statements.
bieber = ['om', 'nom', 'nom'] counts = [1, 2, 3] nums = counts nums.append(4)
- counts is nums
- counts is add([1, 2], [3, 4])