Lamonte Harris wrote:
> File "Desktop\python\newsystem\init.py", line 51, in random_n
> random_name = a+b+c+d+e+ 'temp.txt'
> TypeError: unsupported operand type(s) for +: 'int' and 'str'
>
> import random
> def random_name():
> a = random.randint(0,9)
> b = random.randint(0,9)
>
On 2007-08-23, Jay Loden <[EMAIL PROTECTED]> wrote:
> 2) Since all you're doing is adding a bunch of numeric values to each other
>to build the string, why wouldn't you just create a random number between
>0 -> 9 and use that?
Since the OP calls randint 5 times, his answer is 5 times
Lamonte Harris wrote:
> File "Desktop\python\newsystem\init.py", line 51, in random_n
> random_name = a+b+c+d+e+ 'temp.txt'
> TypeError: unsupported operand type(s) for +: 'int' and 'str'
>
> import random
> def random_name():
> a = random.randint(0,9)
> b = random.randint(0,9)
>