F
F
Friend2017-01-06 07:31:40
Django
Friend, 2017-01-06 07:31:40

How to create and display 2 lists with 1 object in html?

I don't know how to display two lists with 1 object in html. I used to display 2 different ones, but I realized that this is not effective.
Tell me how this can be implemented?
Did something like this:

args = {}
args.update(csrf(request))
args['b'] = ('1', '2', '3')
args['a'] = ('a', 'b', 'c')
return render_to_response('one.html', args)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
Friend, 2017-01-06
@Tiran_94

Implemented in this way.
If there is a more relevant option, I will be grateful)

S
Sergey Gornostaev, 2017-01-06
@sergey-gornostaev

Use itertools.chain()

import itertools
list_c = itertools.chain(list_a, list_b)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question