हिंदी

Find the output of the following program segment: country = 'INDIA' for i in country: print (i) - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Find the output of the following program segment:

country = 'INDIA'
for i in country:
      print (i)
टिप्पणी लिखिए

उत्तर

The variable 'country' will act as a list of characters for the loop to iterate.

OUTPUT:
I
N
D
I
A

shaalaa.com
The ‘For’ Loop
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 6: Flow of Control - Exercise [पृष्ठ १४०]

APPEARS IN

एनसीईआरटी Computer Science [English] Class 11
अध्याय 6 Flow of Control
Exercise | Q 5. (iii) | पृष्ठ १४०
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×