How to select a number without replacement in python
<p>So I'm trying to make a mix and match between numbers here is my code</p>

<pre><code>import random

P1 = float(input("Person's name?")) 
P2 = float(input("Person's name?")) 
P3 = float(input("Person's name?"))

A1 = float(input("Activity?")) 
A2 = float(input("Activity?")) 
A3 = float(input("Activity?")) 

s = (A1, A2, A3)

cool1 = random.sample([A1, A2, A3],1)
cool2 = random.sample([A1, A2, A3],1)
cool3 = random.sample([A1, A2, A3],1)


print ("%s job is %s." %(P1, cool1))

print ("%s job is %s." %(P2, cool2))

print ("%s job is %s." %(P3, cool3))
</code></pre>

<p>The problem is that it is randomizing but it keeps repeating numbers like here</p>

<p>**</p>

<blockquote>
  <p>1.0 job is [4.0].
  2.0 job is [5.0].
  3.0 job is [4.0].</p>
</blockquote>

<p>**</p>

<p>What can I do to make it not repeat.
I'm using python 2.7.12</p>

<p>Also how can I use alphanumerical instead of float only.</p>

<p>You could do this:</p>

<pre><code>cool1, cool2, cool3 = random.sample([A1, A2, A3], 3)
</code></pre>

<blockquote>
  <p>Also how can I use alphanumerical instead of float only.</p>
</blockquote>

<p>Have you tried not converting your inputs to float...?</p>

python python-2.7