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

本站现有博文332篇,共被浏览875493

本站已经建立2583天!

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