Check the References directory and you'll find a couple of example code snippets that you can view and learn from, for example reading and saving text files.
There are plenty of guides online that will teach you programming in Python. Don't know which one to choose? Then choose Coursera because it mixes both video lectures, reading materials and assignments.
- Getting starterd: python.org/about/gettingstarted
- Basics: pythonforbeginners.com
- Python courses: Coursera and Codecademy (note that Codecademy uses Python version 2)
- Learn Python the Hard Way (book and web site): learnpythonthehardway.org
- Learn Python - Full Course for Beginners video: youtube.com/watch?v=rfscVS0vtbw
Do you get an error or have any problems using Python? Stack Overflow is a good place to ask questions and find answers. The Python documentation describes all of the Python language as well.
- Questions and answers: stackoverflow.com
- Official documentation: docs.python.org
How do you find a specific library or a piece of code that you can use? Here's some tips:
- At awesome-python.com you'll find a list of libraries, software and resources
- Use GitHub to explore software projects: https://github.com/explore
- Try googling something like
web scraping python
- How-to: First web scraper: A step-by-step guide to writing a web scraper with Python
- How-to: Python Web Scraping Tutorial using BeautifulSoup
- How-to: Chapter 11 – Web Scraping
- News article: The First News Report on the L.A. Earthquake Was Written by a Robot
- Python code: RoboWriter, a more complex news robot in Python
- An awesome list of high-quality open datasets in public domains (on-going). By everyone, for everyone!
- A awesome list of (large-scale) public datasets on the Internet. (On-going collection)
Jupyter Notebook is great for interactive coding. But you can also write code in a regular program for your computer, such as:
- Visual Studio Code and the extension Python
- Sublime Text
- Atom
All programs are free to use and works with Mac, Windows and Linux. Use Visual Studio Code if you can't decide.
- Search-Script-Scrape: 101 webscraping and research tasks for the data journalist: Exercise sets part of the Stanford Computational Journalism Lab.
- Swe-scrapers: collection of web scrapers and API wrappers for Swedish sites.