Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why are there spaces when I do print x,x,x?
#3
Code:
import os, random
while True: print "".join([str(random.choice([random.choice(['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']),random.choice([1,2,3,4,5,6,7,8,9]),random.choice([',','.',';',':','-','+']),random.choice(['!','@','#','$','%','^','&','*','(',')'])]))for x in xrange(int(raw_input("How Many characters should be in your password?: ")))])

and you are printing a tuple, you want to do + instead of ,
[Image: nv70ad.png]
Terrorcore, unleash, extermination
Hyper real, cold blood, determination
fudge them, I like this sensation
Incredible, I from the annihilation
Reply


Messages In This Thread
RE: Why are there spaces when I do print x,x,x? - by Fallen - 10-31-2009, 08:15 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] print a random variable? nevets04 2 1,786 10-11-2009, 06:42 PM
Last Post: nevets04

Forum Jump:


Users browsing this thread: 1 Guest(s)