current position：Home>module random has no attribute choices
module random has no attribute choices
2022-02-03 01:59:38 【CSDN Q & A】
stay pycharm The code written on
use random.choices( ) Just report a mistake
Switch to random.sample( ) Can run
I have no idea what the problem is
yes python Is the version too old
Refer to the answer 1：
Refer to the answer 2：
Refer to the answer 3：
random.choices() The method is 3.6 Features added in version ., Look at you python Is the version lower than 3.6
Refer to the answer 4：
author[CSDN Q & A],Please bring the original link to reprint, thank you.
The sidebar is recommended
- Why is it an endless loop? And what does I + + in printf mean
- C language function problem,.?!
- In which industries does C + + graphics development develop c++
- Why can't I output with structure
- How to save the processed file after Python data processing? It is found that the file has not changed after saving
- How can this mistake be corrected?
- Python calculates the triple accumulation sum of arrays
- Through the request forwarding command of the servlet program, will the access to the target resources protected by the filter filter be filtered by the filter?
- Pycharm loads TTF font file and displays garbled code
- Hello, is there a corresponding code implementation for the super resolution from a single image you mentioned in the super resolution article two years ago?
guess what you like
Why are the results the same
The MySQL geometry type retains 6 decimal places
The removeall() and addall() methods in the list set are the same as the list What is the difference between the difference set and the sum set of two sets?
Vue project number is automatically generated according to the city and county
How to generate Vue number automatically
Please * God, what about the win service flash back
The users table space of Oracle is migrated to another file path and must be moved under the database shutdown?
How can I do this?
Pointer assignment problem, how to assign
Operation of if function and for function
- Edge browser can't open the new web address. It can only open the web address in favorites
- In Python, what is strip () used for? Is errmsg a keyword or a function? What is it used for
- How does Java cut and drag pictures onto the canvas
- Check whether the data obtained by post already exists in the database
- How to solve the problem of RTC?
- The strategy problem of medical classifier doesn't understand the solution at all
- When making asynchronous non blocking requests, if the protocol is HTTPS, the request will report an error and fail. How to adjust this?
- Why didn't the lazy init tag take effect? Shouldn't it be created when getting the object? Not when spring initializes
- Vue array push object problem
- An error is reported when IntelliJ idea creates a Java class
- Can you change this des encrypted C version to Java version
- Using Python + pandas to extract the data in Excel, there are "0" and "data type". How can we remove these two things?
- Hive starts with an error exception in thread 'main' Java lang.NoSuchMethodError: com. google. common.， Now the whole person is not good
- How to keep the data on the left side of the antd Vue shuttle box
- MySQL SQL field extraction
- The oracledbconsoleorcl service terminated due to the following service specific error: the system could not find the specified file.
- Please answer the questions about ＃ C ＃!
- The index is not triggered when MySQL uses the sum function
- How to learn asp NET Core？？
- Indentation problem of for loop
- Read out the contents of the file "student. TXT" by line and write them to the file "hello. TXT", and add the line number to each line. It is required to output the contents of the file "hello. TXT".
- MySQL creates a database with an error
- The input of binary string in Python
- Django doesn't respond to startup
- Can pandas directly modify CSV or excel original files and save them
- In the Oracle subquery, the from is not a table but a condition. Why
- Pytorch loss = criterion (outputs, y), y has multiple values
- The most basic thing in confusion is not to understand chatting
- What's wrong with the scanner usage?
- How to display the obtained value by month, year and day?
- Skimage module plus Gaussian noise
- CDN fake domain name URL JS script
- Recursive method output Huffman tree leaf node Huffman coding algorithm program
- Merging word document content with VB
- What should I do if pycharm runs with this error
- Char function and string program running
- C + + may be caused by deep and shallow copy
- Defining variables in use + splicing
- Why can't I install Android WiFi ADB when I use Android studio?
- How does the repeater refresh the data source?