Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] print a random variable?
#2
lol printin modules since day 1 son

Code:
import random
array = ['a','b','c','d','e','f']
r4nd0m = random.choice(array)
print (r4nd0m)

IDLE Wrote:>>> import random
>>> array = ['a','b','c','d','e','f']
>>> r4nd0m = random.choice(array)
>>> print(r4nd0m)
c
[Image: sig.php]
Reply


Messages In This Thread
[SOLVED] print a random variable? - by nevets04 - 10-11-2009, 04:39 PM
RE: print a random variable? - by Nyx- - 10-11-2009, 06:01 PM
RE: print a random variable? - by nevets04 - 10-11-2009, 06:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to display variable serial data on Tkinter window. srinivas.rambha 0 1,011 06-17-2013, 05:54 AM
Last Post: srinivas.rambha
  [SOLVED]Referenced before assignment? uber1337 1 1,607 04-05-2010, 06:17 PM
Last Post: Fallen
  Why are there spaces when I do print x,x,x? nevets04 3 1,031 10-31-2009, 06:32 PM
Last Post: nevets04

Forum Jump:


Users browsing this thread: 1 Guest(s)