print "This is a 6 character password generator. Use wisely!" import random import string letters = list(string.letters) numbers = (1, 2, 3, 4, 5, 6, 7, 8, 9) a = random.choice(letters) b = random.choice(numbers) c = random.choice(numbers) d = random.choice(numbers) e = random.choice(numbers) f = random.choice(letters) g = (a + b + c + d + e + f) print g print "Press <enter> to exit."
Every time I try to use it, it gives me the exception "
Traceback (most recent call last):
File "F:\Portable Python\Projects\password.py", line 12, in <module>
g = (a + b + c + d + e + f)
TypeError: cannot concatenate 'str' and 'int' objects"
Please give me an answer of why this is happening. If this is stupid, blame it on that im very new to python.

New Topic/Question
Reply



MultiQuote





|