dom tag

52 questions


1 answers
131 views
0
Python random.shuffle function/list/tuple TypeError: 'NoneType' object is not usable

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 ...

2 years ago

1 answers
81 views
0
I'd like to specify a specific order when selecting Python characters randomly, is it possible?

d = np.random.choice(['A', 'B', 'C', 'D'], 30, p=[0.4, 0.4, 0.1, 0.1])print(d)From the above code Can I set it to turn the same character back to random if it comes out 3 times in a row like AAA?I'd l...

2 years ago
« - 6 -

© 2024 OneMinuteCode. All rights reserved.