mardi 10 janvier 2023

Unwanted Brackets Output in Rubik's Cube Scrambler

I am making a Rubik's cube scrambler program using python 3.10.2 and everything works correctly except for one thing. When the randomly generated scramble is outputted, unwanted square brackets, quotation marks and commas show up as well. Any idea on how to fix this? -Thank you

import random

notation = ["R","L","F","B","U","D","R'","L'","F'","B'","U'","D'","R2","L2","F2","B2","U2","D2"]
scramble = []
i = 0

while i < 9:
    randomNotation = random.choice(notation)
    scramble.append(randomNotation)
    i += 1
print(scramble)

Output: ['L2', 'L', "R'", "D'", 'L', 'F2', 'R', "D2", 'L']




Aucun commentaire:

Enregistrer un commentaire