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

本站现有博文340篇,共被浏览1019274次

本站已经建立2719天!

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