On Mon, Oct 4, 2010 at 1:41 AM, ashy <[email protected]> wrote: > Hi All, > > I am writing a django function in which I have a following list: > li = ['a','b','c'] > I want to create a string from the list which should look like > str = 'a,b,c' > > string_ = "".join(li)
str is a built in class. You shouldn't shadow it. it's better to shadow string which is just a module and best to use string_ or something else. > I plan to pass this string to not in () function of my sql query. > > Are you getting this list from user input? don't do that. I'm new to django so I can't recommend a better way but don't trust user input -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

