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

本站现有博文339篇,共被浏览995817次

本站已经建立2706天!

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