Téléportation #10

Open
opened 2026-05-18 07:51:27 +00:00 by jack.pieri · 0 comments
Owner

Pour l'instant, j'ai testé ça qui peut servir de base :

import random

tab1 = ["0","1","2","3","4"]
tab2 = ["a","b","c","d","e"]
associe = []
temp = [j for j in tab2]
for i in tab1:
rand = random.randint(0,len(temp)-1)
associe.append((i,temp[rand]))
temp.pop(rand)
print(associe)

Pour l'instant, j'ai testé ça qui peut servir de base : import random tab1 = ["0","1","2","3","4"] tab2 = ["a","b","c","d","e"] associe = [] temp = [j for j in tab2] for i in tab1: rand = random.randint(0,len(temp)-1) associe.append((i,temp[rand])) temp.pop(rand) print(associe)
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: P5/p5-1.2-g10#10
No description provided.