Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # string_endswith_various_values.py
- vals="""
- abc.001
- abc001
- abc.002
- abc.xyz
- abcxyz
- abc.003
- xyz.001
- xyz.002
- xyz002
- 001.xyz
- 123.001
- .001
- 123.002
- .002xyz
- 003.003
- xyz.003
- .001234
- abc.abc
- 001x002
- """
- vals=vals.split()
- for val in vals:
- if val.endswith(('.001','.002','xyz')):
- print val
- print
- print 'Done!'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement