x1 contains 10008 random value (10008 rows, 1 columns)
file=open('random.txt','r')
x1=file.readlines()
now i want to assign 1-5000 random values from x1 to x e.g:
x=x1(5000,1)
now half other 5000-10009 values assign to other variable from x1 to xx e.g:
xx=x1(10008,5000)
i did'nt understand how to write this in python.
试试这个:
我认为这里没有必要进行柜台核对。只需使用slice检索目标列表。你知道吗
相关问题 更多 >
编程相关推荐