Python random.choice außer einer OptionPython

Python-Programme
Anonymous
 Python random.choice außer einer Option

Post by Anonymous »

Ich versuche, random.choice () ein Element aus einem Wörterbuch auszuwählen. Zum Beispiel: < /p>

Code: Select all

mutationMarkers = {0: "original", 1: "point_mutation", 2: "frameshift_insertion",
3: "frameshift_deletion", 4: "copy_number_addition",
5: "copy_number_subtraction"}

mutator = choice(list(markers)) # output is 0, 1, 2, 3, 4, 5
Ist es möglich, random.choice und ignorieren {0: "Original"} ?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post