Python Day-2
Python Day-2
Python Strings
a = "Hello"
print(a[1]) #e
Hel l o
01234
Index start from 0
print(len(a)) #5
Length of string 5
Lets search the free text in the following text.
# Hello
Python For Loops
for x in range(6):
print(x)
Python For Loops
i=1
while i < 6:
print(i)
i += 1
Python While Loops
i=1
while i < 6:
print(i)
i += 1
1. Print series 10 20 30 40 50 60 70 using for loop