Quick actions

cmd+k|ctrl+k

Navigation

Languages

exercise 5 - lab 2

Snippet info

Language

Python

Visibility

public

Author

hccc19

Created

2016-10-14T10:15:49Z

Updated

2016-10-14T10:15:49Z

# exercise 5 - lab 2
s = 'pythynytontun'
char_need_find = 'u'
index = s.rfind(char_need_find)
if index > -1 :
    print('last index of %s = %s' % (char_need_find, index))
else :
    print('string : %s not contains character: %s' % (s, char_need_find))
INFO