Skip to content

Instantly share code, notes, and snippets.

@offby1
Created July 12, 2015 03:07
Show Gist options
  • Select an option

  • Save offby1/74e3d00963b2437a68c1 to your computer and use it in GitHub Desktop.

Select an option

Save offby1/74e3d00963b2437a68c1 to your computer and use it in GitHub Desktop.
>>> x = ([i/10.0 for i in range (41)])
>>> y = [i*i for i in x]
>>> y
[0.0, 0.010000000000000002, 0.04000000000000001, 0.09, 0.16000000000000003, 0.25, 0.36, 0.48999999999999994, 0.6400000000000001, 0.81, 1.0, 1.2100000000000002, 1.44, 1.6900000000000002, 1.9599999999999997, 2.25, 2.5600000000000005, 2.8899999999999997, 3.24, 3.61, 4.0, 4.41, 4.840000000000001, 5.289999999999999, 5.76, 6.25, 6.760000000000001, 7.290000000000001, 7.839999999999999, 8.41, 9.0, 9.610000000000001, 10.240000000000002, 10.889999999999999, 11.559999999999999, 12.25, 12.96, 13.690000000000001, 14.44, 15.209999999999999, 16.0]
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment