2. s=input("Enter a string")
a=""
for x in s:
a= a + x
print (a)
print(a.find(s))
value of string:"PYTHON"
Answers
Answered by
2
Output:
P
PY
PYT
PYTH
PYTHO
PYTHON
0
Note: the output may be different - the indentation is unclear.
Similar questions