add item to list

14 views
Skip to first unread message

Mustafa Ryad

unread,
Jul 5, 2018, 11:12:50 AM7/5/18
to Django users
How can  i add item to this is list
django.PNG

Kasper Laudrup

unread,
Jul 5, 2018, 11:49:59 AM7/5/18
to django...@googlegroups.com
Hi Mustafa,

On 2018-07-05 14:56, Mustafa Ryad wrote:
> How can  i add item to this is list
>

You need to provide a lot more context if anyone should be able to help you.

Kind regards,

Kasper Laudrup

Oladipupo Elegbede

unread,
Jul 5, 2018, 11:56:21 AM7/5/18
to django...@googlegroups.com
First, you need to know how to add items to an existing list.

x = ['egg']
s = 'spam'
x.append(s)
x = ['egg', 'spam']

This is basic python.

Back to Django, how are you accessing the item you want to add to the list?

What logic do you have already for the list.

If you throw a little more light, help is on the way...

On Thu, Jul 5, 2018, 10:12 Mustafa Ryad <mustaf...@gmail.com> wrote:
How can  i add item to this is list

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c2dda62a-4225-4a3f-bd7c-6f2ab91af511%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages