Python Daily Question - 118

Опубликовано: 17 Июль 2026
на канале: coding_with_mani
19
0

Python Daily Question - 118

Step-by-Step Explanation:
1. Initialization:
a = "118"

Here, a is initialized as a string with the value "118".

2. Loop:
for i in a:

This loop iterates over each character in the string a.
In this case, the string "118" has three characters: '1', '1', and '8'.

3. Print Statement:
print("mani")

During each iteration of the loop, the string "mani" is printed.

Iterations:

1. First Iteration:
i is '1'
Output: mani

2. Second Iteration:
i is '1'
Output: mani

3. Third Iteration:
i is '8'
Output: mani

Final Output:

The print statement inside the loop is executed three times, once for each character in the string "118". Therefore, the output is:

mani
mani
mani

So, the program prints the word "mani" three times.












































































#coding_with_mani #python #code #viral #youtubeshorts #shorts #short #youtube #code #india #code #viral #youtubeshorts #shorts #short #youtube #code #india
#pythonquestions #python #coding #youtube #pythonprogramming #code #programminglanguage #pythonprogramming
#shorts #python #code #viral #trending #youtubeshorts #sql #sqlserver #data #database #daily #dailyshorts #dailyquestions #dailyseries