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

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

本站已经建立2583天!

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