EADST

ValueError: invalid literal for int() with base 10

ValueError: invalid literal for int() with base 10 in Python.

Use eval() to avoid this error.

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

本站现有博文321篇,共被浏览775860

本站已经建立2466天!

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