251 questions
import randomQ = int(input('drawing lots!') Please enter a quota.')numbers = list(range(1, Q + 1))R1 = random.choice(numbers)print('{} and''.format.(R1))numbers.remove(R1)R2 = random.choice(numbers)pr...
We created a list and wrote an extend() function that adds up the other lists in it. But the variable has the expression array().For example, if you specify k=[] and a=[1,2],[2,3],[4,5],[6,7] are adde...
I want to make a list of sizes (900, 156, 2) by repeating the process of averaging 2496 data with axis=1 in a three-dimensional list of sizes (900, 2496,2) in 16 window sizes and returning it as a sin...
As far as I know, remove() only removes the first item that looks like it, so what should I do to erase all the items from the list?The way I use it is not really Python, but it seems to be slow becau...
For example,list = [1,1,1,1,3,3,7,10]->1 is 4->3 is 2Is there a function that counts like this?
name = ['m1', 'm2', 'm3', 'm4', 'm5']I want to put a str that is combined with letters and numbers like thisIs there a function in R that functions like paste(m, 1:5, step=?
def exc(lis1,lis2): lis1,lis2 = lis2,lis1 print(lis1:,lis1) print(lis2:,lis2)a = [1,2,3]b = [4,5,6]exc(a,b)print(a)print(b)When you do this,In the exc function, the a list b list comes out opposite to...
A = [1,2,3,4,5, ..., 100]TheA = [ [1,2,3,4,5,6,7,8,9,10], [11,12,13,...,20],... , [91,92,...99] ]I'm looking for a way to change it like this.I think I can use this interlator, but the cost is too hig...
« | - 9 - | » |
© 2024 OneMinuteCode. All rights reserved.