Uploaded May 2019 | Updated September 2026, 3 weeks ago
A short clip of a tiny clam (about 5 mm long) that digs into the sand of the beach. You can see its body reaching out from the shell and digging into the sand. It appears to move by sucking in water from the front, and pushing it out the back.
A short clip of a tiny clam (about 5 mm long) that digs into the sand of the beach. You can see its body reaching out from the shell and digging into the sand. It appears to move by sucking in water from the front, and pushing it out the back.


![Running Python code with Rapunzel Code Editor
[https://www.buymeacoffee.com/cogsci] Rapunzel is a code editor for numerical computing with Python and R. In this video, I show how run Python code directly from the editor. For more information, visit https://rapunzel.cogsci.nl/ Running Python code with Rapunzel Code Editor](https://i.ytimg.com/vi/UYKIIsyex1g/mqdefault.jpg)
![Python Generators 1: Functions that yield, suspend, and resume
[https://www.buymeacoffee.com/cogsci] For more Python tutorials, visit http://python.cogsci.nl/. In this video, I demonstrate the basic principle of generator functions (functions that yield) in Python. Code is available on osf.io/eyxc3. Python Generators 1: Functions that yield, suspend, and resume](https://i.ytimg.com/vi/Ut0-_eMVakU/mqdefault.jpg)
![Generator expressions in Python [Python comprehensions #4)
[https://www.buymeacoffee.com/cogsci] In this video, I demonstrate generator expressions in Python. These are a way to implement a generator with a list-comprehension-like syntax. The notebook for this video is available at https://osf.io/wshd5/. For more tutorials, visit https://python.cogsci.nl/. Generator expressions in Python [Python comprehensions #4)](https://i.ytimg.com/vi/V2FOlOW0bTs/mqdefault.jpg)
![7 Simple Tricks to Write Better Python Code
[https://www.buymeacoffee.com/cogsci] Visit http://python.cogsci.nl/ for more tutorials! Seven solutions to common small problems that Python programmers often solve in a suboptimal way. This video is understandable for beginners, but also contains useful advice for experienced programmers.
- 0:50 Using enumerate()
- 3:22 Using zip()
- 6:35 Tuple unpacking
- 9:40 Default dict values
- 12:42 For ... else
- 16:13 File reading with with
- 19:40 Exception handling 7 Simple Tricks to Write Better Python Code](https://i.ytimg.com/vi/VBokjWj_cEA/mqdefault.jpg)

![Creating a command-line app in Python [PythonLiveLessons #4]
The fifth episode of #PythonLiveLessons, a weekly live stream about Python code and more, hosted by Sebastiaan Mathôt. In this episode, well turn our `markdown_code_exec` Python module, which we created in previous episodes, into a command-line application! Well learn about the `argparse` module to parse command-like arguments, about entry points, and about the if name main convention.ing Creating a command-line app in Python [PythonLiveLessons #4]](https://i.ytimg.com/vi/VcgBAwdz7aA/mqdefault.jpg)


![Getting started with Git and GitHub [PythonLiveLessons #3]
The fourth episode of #PythonLiveLessons, a weekly live stream about Python code and more, hosted by Sebastiaan Mathôt. In this episode, well get started with git to host the code for our `markdown_code_exec` on GitHub. Well learn about the most important git commands: commit, push, pull, remote, and add. Getting started with Git and GitHub [PythonLiveLessons #3]](https://i.ytimg.com/vi/X99FOxKcdMk/mqdefault.jpg)