![]()  | 
	
| 
	 | 
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
				
				Random array
			 
			
			
			Is there any way I can create an array of 
		
		
		
		
		
		
		
		
	
	Continuous random sort it thank all !!  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			You can use one of the functions from Python's random module to generate random numbers and place those in a list. Lists have a sort method you can use to sort the elements within. 
		
		
		
		
		
		
		
		
	
	Code: 
	import random numbers = [] for i in range(1,10): number = random.randint(1,10) numbers.append(number) print numbers numbers.sort() print numbers  | 
![]()  | 
	
	
| Thread Tools | |
| Display Modes | Rate This Thread | 
		
  | 
	
		
  | 
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| random coding | Saz | Vizard | 1 | 05-27-2010 06:44 PM | 
| random speed and associated coding | Saz | Vizard | 1 | 05-20-2010 05:03 AM | 
| Semi-circle array containing target and distractor objects | ptjt255 | Vizard | 3 | 08-04-2009 04:09 AM | 
| Random head movements | VR_enthusiast | Vizard | 2 | 07-19-2006 12:59 PM | 
| Copy objects in an array to another array | Johannes | Vizard | 3 | 04-29-2005 03:37 PM |