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

本站现有博文327篇,共被浏览833107

本站已经建立2538天!

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