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

本站现有博文323篇,共被浏览799755

本站已经建立2498天!

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