find a character in a String Python

Description

python program to get a String and a character then find where the character occurred first in the string.
Input:
Hello
l
Output:
2

Solution

s=input("Enter a String:")
c=input("Enter a Character:")

for i in range(0,len(s)):
    if(s[i]==c):
        print(i)
        break
else:
    print("Not Found")

Explanation

Visit each location in string s one by one 
for i in range(0,len(s)):

if character c is found, return th location i



Interesting Pattern Programs: for more Patterns

Input:
5
Output:
*
**
***
****
*****
****
***
**
*Solution
Input:
5
Output:
    *
   ***
  *****
 *******
*********
 *******
  *****
   ***
    *Solution
Input:
5
Output:
*        *
**      **
***    ***
****  ****
**********Solution
Input:
5
Output:
*       *
**     **
***   ***
**** ****
*********Solution
Input:
5
Output:
*       *
**     **
***   ***
**** ****
*********
**** ****
***   ***
**     **
*       *Solution
Input:
5
Output:
*********
 *******
  *****
   ***
    *
   ***
  *****
 *******
*********Solution