Advertisements
Advertisements
Question
Find the output of the following program segment:
country = 'INDIA'
for i in country:
print (i)Short/Brief Note
Advertisements
Solution
The variable 'country' will act as a list of characters for the loop to iterate.
OUTPUT:
I
N
D
I
A
shaalaa.com
Is there an error in this question or solution?
Chapter 6: Flow of Control - Exercise [Page 140]
