KnowledgeBoat Logo
|

Robotics & Artificial Intelligence

Write the output of the following code:

nums = [1, 2, 3]
print(nums)
print(type(nums))

Getting Started

1 Like

Answer

Output
[1, 2, 3]
<class 'list'>
Explanation
  • print(nums) displays the contents of the list nums.
  • print(type(nums)) displays the data type of nums, which is a list in Python.

Answered By

3 Likes


Related Questions