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

本站现有博文324篇,共被浏览821390

本站已经建立2526天!

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