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

本站现有博文338篇,共被浏览978356次

本站已经建立2691天!

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