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

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

本站已经建立2442天!

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