Trying to make a boolean list in python -


i need make list in python lists numbers 0 n true initially. have use def shake(alist):

i tried other code informed didnt create boolean list true, had calculated numbers ends being wrong. supposed create list values true, , make set integer values false multiples of prime numbers , print off list of remaining true values. stuck on how begin because havent seen before. in right direction appreciated.

>>> n = 10 >>> [true] * n [true, true, true, true, true, true, true, true, true, true] 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -