English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

What will be the result of the following Python code? S = [x**2 for x in range(5)]print(S) - Computer Science

Advertisements
Advertisements

Question

What will be the result of the following Python code?

S = [x**2 for x in range(5)]
print(S)

Options

  • [0,1,2,4,5]

  • [0,1,4,9,16]

  • [0,1,4,9,16,25]

  • [1,4,9,16,25]

MCQ

Solution

[0,1,4,9,16]

shaalaa.com
Introduction to List
  Is there an error in this question or solution?
Chapter 9: Lists, Tuples, Sets and Dictionary - Evaluation [Page 167]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 12 TN Board
Chapter 9 Lists, Tuples, Sets and Dictionary
Evaluation | Q 7. | Page 167
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×