EADST

Python: Terminal Input to List

Transfer Terminal Input to List

 # give the group number
 # 2
 # group one
 # 1 3 2
 # group two
 # 1 2 1 3 2
inputs = []
count = int(input())
for i in range(count):
    s = input()
    line = []
    for x in s.split():
        line.append(int(x))
    inputs.append(line)
print(inputs) # [[1, 3, 2], [1, 2, 1, 3, 2]]

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

本站现有博文337篇,共被浏览961699次

本站已经建立2673天!

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