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

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

本站已经建立2669天!

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