string input Enter String char input Enter Character Mark -1 for in ra

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
string = input("Enter String : ")
char = input("Enter Character : ")
Mark = -1
for i in range(len(string)):
if(string[i] == char):
Mark = i
if(Mark == -1):
print("Это не хорошо. Маркус not happy")
else:
print("Last Occurrence of ", char, " is Found at Position " , Mark )