#!/usr/bin/env python # encoding: utf-8 """Sum timing.""" import time def oft_summieren(liste, anzahl): for i in range(anzahl): sum(liste) return sum(liste) if __name__ == "__main__": liste = [i for i in range(200)] t = time.time() print oft_summieren(liste, 100000) print time.time() - t