Averybasicintroductiontoscientific Pythonprogramming

The range function returns a list of integers: range(a, b, s) returns the ... # Shorter version using list comprehension (same as the loop above) values=[i*0.1 for i in range(11)] for value in values: ... >>>L=[1,4,10.0] # List of numbers >>>a=numpy.array(L) # Make corresponding array >>> print a [1.4.10.] >>> print a[1] 4.0 ................
................