Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file1 = 'files/abc_xyz.py'
- file2 = 'files/def/abc_xyz.py'
- result1 = file1.split( '.' )[ 0 ].split( '/' )[ 1 ]
- if result1.find( '_' ) != -1:
- result1 = result1.split( '_' )[ 1 ]
- result2 = file2.split( '.' )[ 0 ].split( '/' )[ 1 ]
- if result2.find( '_' ) != -1:
- result2 = result2.split( '_' )[ 1 ]
- print( '"'+result1+'" and "'+result2+'"' )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement