question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Appending to a list

See original GitHub issue

I’m trying to append to a list. Jinja2 docs suggest a similar pattern:

{% do navigation.append('a string') %}

Neither do nor list.append() seems to exist in nunjucks.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

13reactions
rambo-pandacommented, Apr 21, 2016
<<set a = [1,2]>>
<<set a = (a.push(3),a) >>
0reactions
tk-codescommented, Sep 27, 2016

@rambo-panda Your solution works. but how efficient is that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python List append() - Programiz
In this tutorial, we will learn about the Python list append() method with the help of examples. The append() method adds an item...
Read more >
Python List append() Method - W3Schools
Python List append() Method · Example. Add an element to the fruits list: fruits = ['apple', 'banana', 'cherry'] fruits.append("orange") · Example. Add a...
Read more >
Python's .append(): Add Items to Your Lists in Place
Python provides a method called .append() that you can use to add items to the end of a given list. This method is...
Read more >
Python List append() Method - GeeksforGeeks
The Python List append() method is used for appending and adding elements to the end of the List. Syntax: list.append(item). Parameters:.
Read more >
Python List .append() – How to Add an Item to a List in Python
Methods to Add Items to a List · list.insert() – inserts a single element anywhere in the list. · list.append() – always adds...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found