diff options
Diffstat (limited to 'progs/a909.py')
-rw-r--r-- | progs/a909.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/progs/a909.py b/progs/a909.py new file mode 100644 index 0000000..4eb1d5b --- /dev/null +++ b/progs/a909.py @@ -0,0 +1,9 @@ +def last_occurence_char(string,char):
+ flag = -1
+ for i in range(len(string)):
+ if(string[i] == char):
+ flag = i
+ if(flag == -1):
+ return None
+ else:
+ return flag + 1
\ No newline at end of file |