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

本站现有博文330篇,共被浏览861484

本站已经建立2570天!

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