Quick actions

cmd+k|ctrl+k

Navigation

Languages

bai 3 - 3

Snippet info

Language

Python

Visibility

public

Author

hccc19

Created

2016-10-23T13:00:48Z

Updated

2016-10-23T13:00:48Z

s = 'thiendiahoi..us.lx.py.thong'
index = s.rfind('.')
if index == -1:
    print('nothing to show')
elif s[index:] == '.':
    print('nothing to show 2')
else:
    print(s[:index])
INFO