Hey Guys

I might be missing something obvious here.


import numpy as np

count = 0
[ count += 1 for num in np.random.random_integers(1,100,20) if num > 20]

 File "<ipython-input-45-0ba0e51b7644>", line 2
    [ count += 1 for num in np.random.random_integers(1,100,20) if num > 20]
             ^
SyntaxError: invalid syntax


Also tried
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to