Hello!
While I was working on this and that with what I learned, I thought I could randomly extract two lists at once and make a code, but in the A=tuple(a)
step, it said TypeError: 'NoneType' object is impossible'
and I'm looking for a master who can explain why. Thank you very much for your reply in advance!
import random
data1 = ["Ga", "Na", "Da", "La"]
data2 = ['a','b','c','d']
a= random.shuffle(data1)
b= random.shuffle(data2)
A= tuple(a)
dic = {A:b}
print(dic)
import random
data1 = ["Ga", "Na", "Da", "La"]
data2 = ['a','b','c','d']
random.shuffle(data1)
random.shuffle(data2)
dic = {a: b for a, b in zip(data1, data2)}
print(dic)
I think it'd be good to do it like this.
565 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
870 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
573 PHP ssh2_scp_send fails to send files as intended
593 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.