filmov
tv
Python String Iteration using For loop

Показать описание
Python String Iteration using For loop
for loop iterates over a string and
print each character on a new line.
s = "MAPLA"
for i in s:
print(i)
The loop assigns each character
to the variable i
and continues until
all characters in the
string have been processed.
Output
M
A
P
L
A
itmemes #programmingmemes #tamilmemes #tamilreels #Coding #codinglife #funnymemes #c #java #python #pythonprogramming #pythontutorial
Under the Copyright Disclaimer under Section 107 of the Copyright Act 1976, there is an allowance for ‘fair use’ of copyrighted material for such purposes as education and research, scholarship, criticism, news reporting, comment, and teaching. Fair use copyright disclaimer refers to the use allowed by the copyright statute, which would otherwise be looked at as an infringement.
for loop iterates over a string and
print each character on a new line.
s = "MAPLA"
for i in s:
print(i)
The loop assigns each character
to the variable i
and continues until
all characters in the
string have been processed.
Output
M
A
P
L
A
itmemes #programmingmemes #tamilmemes #tamilreels #Coding #codinglife #funnymemes #c #java #python #pythonprogramming #pythontutorial
Under the Copyright Disclaimer under Section 107 of the Copyright Act 1976, there is an allowance for ‘fair use’ of copyrighted material for such purposes as education and research, scholarship, criticism, news reporting, comment, and teaching. Fair use copyright disclaimer refers to the use allowed by the copyright statute, which would otherwise be looked at as an infringement.