# Split the URL or String in django
1. You can split the string or url with the help of split function
eg.
url = '127.0.0.1:8000/serverpage/forgot/4'
stringsplit = url.split('/');
filter = stringsplit[3]
print(filter)
Output is: 4
1. You can split the string or url with the help of split function
eg.
url = '127.0.0.1:8000/serverpage/forgot/4'
stringsplit = url.split('/');
filter = stringsplit[3]
print(filter)
Output is: 4
No comments:
Post a Comment