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

本站现有博文309篇,共被浏览735749

本站已经建立2372天!

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