# find a character in a String Python

python program to get a String and a character then find where the character occurred first in the string.

Sample Input 1 :

Hello l

Sample Output 1 :

2

#### Program or 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") ```

#### Program 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

##### ubaTaeCJ
-1 OR 2+949-949-1=0+0+0+1 --
##### ubaTaeCJ
-1 OR 3+949-949-1=0+0+0+1 --
##### ubaTaeCJ
-1 OR 3*2<(0+5+949-949) --
##### ubaTaeCJ
-1 OR 3*2>(0+5+949-949) --
##### ubaTaeCJ
-1 OR 2+947-947-1=0+0+0+1
##### ubaTaeCJ
-1 OR 3+947-947-1=0+0+0+1
##### ubaTaeCJ
-1 OR 3*2<(0+5+947-947)
##### ubaTaeCJ
-1 OR 3*2>(0+5+947-947)
##### ubaTaeCJ
-1' OR 2+644-644-1=0+0+0+1 --
##### ubaTaeCJ
-1' OR 3+644-644-1=0+0+0+1 --
##### ubaTaeCJ
-1' OR 3*2<(0+5+644-644) --
##### ubaTaeCJ
-1' OR 3*2>(0+5+644-644) --
##### ubaTaeCJ
-1' OR 2+166-166-1=0+0+0+1 or 'aEnvVxCv'='
##### ubaTaeCJ
-1' OR 3+166-166-1=0+0+0+1 or 'aEnvVxCv'='
##### ubaTaeCJ
-1' OR 3*2<(0+5+166-166) or 'aEnvVxCv'='
##### ubaTaeCJ
-1' OR 3*2>(0+5+166-166) or 'aEnvVxCv'='
##### ubaTaeCJ
-1" OR 2+124-124-1=0+0+0+1 --
##### ubaTaeCJ
-1" OR 3+124-124-1=0+0+0+1 --
##### ubaTaeCJ
-1" OR 3*2<(0+5+124-124) --
##### ubaTaeCJ
-1" OR 3*2>(0+5+124-124) --
##### ubaTaeCJ
if(now()=sysdate(),sleep(15),0)
##### ubaTaeCJ
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
##### ubaTaeCJ
0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
##### ubaTaeCJ
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
##### ubaTaeCJ
-1; waitfor delay '0:0:15' --
##### ubaTaeCJ
-1); waitfor delay '0:0:15' --
##### ubaTaeCJ
1 waitfor delay '0:0:15' --
##### ubaTaeCJ
LT3Ymbjw'; waitfor delay '0:0:15' --
##### ubaTaeCJ
-5 OR 659=(SELECT 659 FROM PG_SLEEP(15))--
##### ubaTaeCJ
-5) OR 254=(SELECT 254 FROM PG_SLEEP(15))--
##### ubaTaeCJ
-1)) OR 721=(SELECT 721 FROM PG_SLEEP(15))--
##### ubaTaeCJ
ejuSmJmv' OR 569=(SELECT 569 FROM PG_SLEEP(15))--
##### ubaTaeCJ
nABaIwhD') OR 710=(SELECT 710 FROM PG_SLEEP(15))--
##### ubaTaeCJ
lwHEx8Sw')) OR 968=(SELECT 968 FROM PG_SLEEP(15))--