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

本站现有博文322篇,共被浏览786494

本站已经建立2480天!

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