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

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

本站已经建立2600天!

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