hello
There is a string below.
FTP://21.105.28.15/abc/test1.txt
Cut this string
/abc/
I just want to get the path.
How do I parse the string?
import pymssql
conn = pymssql.connect('10.21.100.21', 'sa', 'abc', 'DBA', as_dict=False)
cur = conn.cursor()
cur.execute('select path From table')
fetch = cur.fetchall()
for i in fetch:
print (i) <==== FTP://21.105.28.15/abc/test1.txt (Cut this string /abc/
I just want to get the path.)
conn.close()