if removepunc == "on":
punctuations = '''!()-[]{};:'"\,<>./?@#$%^&*_~'''
analyzed = ""
for char in djtext:
if char not in punctuations:
analyzed = analyzed + char
params = {'purpose':'Removed Punctuations', 'analyzed_text': analyzed}
return render(request, 'analyze.html', params)
else:
return HttpResponse("Error")
So basically this removes punctuations from a sentence and I'm not getting the loop part of the program. If anyone could explain, it would be great! Thanks