[Tutor] Python & algorithms (Lang line simplification algorithm)

Alan Gauld alan.gauld at btinternet.com
Sun Apr 6 20:21:21 CEST 2014

On 06/04/14 09:46, Laura Kauria wrote:

> Can someone help with which kinds of libraries I need to download to
> start to work with lists consisting coordinates?

It depends what you are doing but you may not need to
download anything. Like Java Python has a large
standard library of modules.

Also python built in collection types include tuples
which can be used to store point data (x,y,z)
And lists for collections of objects, including
other lists. And dictionaries for value based lookups.

> Here are a pseudocode of the algorithm
> http://web.cs.sunyit.edu/~poissad/projects/Curve/about_algorithms/lang

A cursory glance suggests you can do all of that
using standard Python.

Alan G
Author of the Learn to Program web site

More information about the Tutor mailing list