EADST

Python: Get A List of Different Random Numbers

Only one line can get a list of different random numbers (sampling without replacement). Here is the code.

import random

print(random.sample(range(1, 10), 5))
# output: [5, 8, 4, 1, 7]
相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
图标 COCO Animate Diagram Rebuttal ResNet-50 Logo GPTQ FP64 Review Baidu LoRA 递归学习法 ChatGPT OCR icon Michelin 关于博主 Hungarian Augmentation 飞书 AI v0.dev 论文 Knowledge Bert Django Github Linux FP32 VPN 净利润 TTS Translation Mixtral OpenAI 版权 CEIR Template Paper Input printf tar Qwen2 Password WebCrawler CV Statistics LLM PDB QWEN 多进程 Pytorch llama.cpp BeautifulSoup ONNX YOLO Freesound CTC v2ray Domain Clash Transformers Quantization 云服务器 PyTorch SQL RGB C++ SPIE RAR Markdown Google Dataset WAN Anaconda Magnet 域名 CLAP Tensor Agent HaggingFace VSCode LaTeX Disk 报税 Vmess Python Datetime Pandas 算法题 Llama SQLite MD5 证件照 News Git Land NLP BF16 diffusers 论文速读 LeetCode Web OpenCV Color Windows Bitcoin git-lfs Permission Gemma TensorRT Algorithm scipy Data Tiktoken Jupyter Firewall mmap Vim 财报 NLTK Hotel Heatmap Base64 Ubuntu 阿里云 FP8 Cloudreve LLAMA CC Plotly Card Crawler Food CUDA Claude SAM Qwen 音频 UNIX Excel Zip GoogLeNet Website Jetson CSV NameSilo ModelScope Proxy XML Numpy Plate Random PyCharm FlashAttention 签证 PDF SVR Attention GIT GGML Quantize FP16 IndexTTS2 多线程 Tracking uwsgi Miniforge Docker tqdm InvalidArgumentError Bipartite Shortcut 顶会 transformers 公式 HuggingFace CAM Qwen2.5 Bin DeepSeek Safetensors TSV 腾讯云 Search Math Nginx hf 第一性原理 Use Pillow Distillation uWSGI Breakpoint GPT4 Pickle Image2Text 图形思考法 torchinfo EXCEL 强化学习 XGBoost DeepStream Video Sklearn VGG-16 FastAPI TensorFlow UI logger JSON API 继承 PIP 搞笑 BTC git Streamlit Hilton Paddle Interview Ptyhon Conda
站点统计

本站现有博文327篇,共被浏览833716

本站已经建立2538天!

热门文章
文章归档
回到顶部