Python String Iteration using For loop

preview_player
Показать описание
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.

Рекомендации по теме
welcome to shbcf.ru