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

本站现有博文333篇,共被浏览922182

本站已经建立2628天!

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