हिंदी

What will be the output of the following statement? list1 = [12,32,65,26,80,10] list1.sort() print(list1) - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

What will be the output of the following statement?

list1 = [12,32,65,26,80,10]
list1.sort()
print(list1)
टिप्पणी लिखिए

उत्तर

The sort() method will sort the list in ascending order in place.

OUTPUT:

[10, 12, 26, 32, 65, 80]

shaalaa.com
List
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 9: Lists - Exercise [पृष्ठ २०४]

APPEARS IN

एनसीईआरटी Computer Science [English] Class 11
अध्याय 9 Lists
Exercise | Q 1. i. | पृष्ठ २०४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×